mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 21:00:08 -04:00
fixup
This commit is contained in:
parent
72fa526a85
commit
8a11b02fe4
4 changed files with 22 additions and 31 deletions
|
|
@ -21,24 +21,22 @@ vim.opt.runtimepath:append('.')
|
|||
-- needed on CI
|
||||
vim.fn.mkdir(vim.fn.stdpath('cache'), 'p')
|
||||
|
||||
local ok = nil
|
||||
local done = nil
|
||||
if update then
|
||||
require('nvim-treesitter.install').update('all', {}, function(success)
|
||||
ok = success
|
||||
require('nvim-treesitter.install').update('all'):await(function(_err, ok)
|
||||
done = ok
|
||||
end)
|
||||
else
|
||||
require('nvim-treesitter.install').install(
|
||||
#parsers > 0 and parsers or 'all',
|
||||
{ force = true, generate = generate, max_jobs = max_jobs },
|
||||
function(success)
|
||||
ok = success
|
||||
end
|
||||
)
|
||||
require('nvim-treesitter.install')
|
||||
.install(#parsers > 0 and parsers or 'all', { force = true, generate = generate, max_jobs = max_jobs })
|
||||
:await(function(_err, ok)
|
||||
done = ok
|
||||
end)
|
||||
end
|
||||
|
||||
vim.wait(6000000, function()
|
||||
return ok ~= nil
|
||||
return done ~= nil
|
||||
end)
|
||||
if not ok then
|
||||
if not done then
|
||||
vim.cmd.cq()
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue