This commit is contained in:
Christian Clason 2025-05-16 15:55:18 +02:00
parent 4eaca06ee2
commit a0a5753679
3 changed files with 8 additions and 13 deletions

View file

@ -21,19 +21,14 @@ vim.opt.runtimepath:append('.')
-- needed on CI
vim.fn.mkdir(vim.fn.stdpath('cache'), 'p')
local task = nil
if update then
--- @type async.Task
task = require('nvim-treesitter.install').update('all')
else
--- @type async.Task
task = require('nvim-treesitter.install').install(
---@type async.Task
local task = update and require('nvim-treesitter.install').update('all')
or require('nvim-treesitter.install').install(
#parsers > 0 and parsers or 'all',
{ force = true, generate = generate, max_jobs = max_jobs }
)
end
local ok, err_or_ok = task:pwait(6000000)
local ok, err_or_ok = task:pwait(1800000) -- wait max. 30 minutes
if not ok then
print('ERROR: ', err_or_ok)
vim.cmd.cq()