mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
Avoid global handle to enable installing multiple parsers in parallel
This commit is contained in:
parent
fc88339832
commit
0b4cdba3e4
1 changed files with 3 additions and 1 deletions
|
|
@ -40,6 +40,8 @@ local function iter_cmd(cmd_list, i, ft)
|
||||||
local attr = cmd_list[i]
|
local attr = cmd_list[i]
|
||||||
if attr.info then print(attr.info) end
|
if attr.info then print(attr.info) end
|
||||||
|
|
||||||
|
local handle
|
||||||
|
|
||||||
handle = luv.spawn(attr.cmd, attr.opts, vim.schedule_wrap(function(code)
|
handle = luv.spawn(attr.cmd, attr.opts, vim.schedule_wrap(function(code)
|
||||||
handle:close()
|
handle:close()
|
||||||
if code ~= 0 then return api.nvim_err_writeln(attr.err) end
|
if code ~= 0 then return api.nvim_err_writeln(attr.err) end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue