diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2024-10-12 20:14:21 +0200 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2025-05-12 18:43:40 +0200 |
| commit | aaf5b7fdf7664581601063f7804cff02e849525e (patch) | |
| tree | c21201ce344d97c353a14d3b3133e9ce7074f0b8 /scripts/install-parsers.lua | |
| parent | feat(install)!: bump minimum tree-sitter version to 0.24 (diff) | |
| download | nvim-treesitter-aaf5b7fdf7664581601063f7804cff02e849525e.tar nvim-treesitter-aaf5b7fdf7664581601063f7804cff02e849525e.tar.gz nvim-treesitter-aaf5b7fdf7664581601063f7804cff02e849525e.tar.bz2 nvim-treesitter-aaf5b7fdf7664581601063f7804cff02e849525e.tar.lz nvim-treesitter-aaf5b7fdf7664581601063f7804cff02e849525e.tar.xz nvim-treesitter-aaf5b7fdf7664581601063f7804cff02e849525e.tar.zst nvim-treesitter-aaf5b7fdf7664581601063f7804cff02e849525e.zip | |
fix(install): return error code in callback
Diffstat (limited to 'scripts/install-parsers.lua')
| -rwxr-xr-x | scripts/install-parsers.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/install-parsers.lua b/scripts/install-parsers.lua index 756d34561..36be0b9c4 100755 --- a/scripts/install-parsers.lua +++ b/scripts/install-parsers.lua @@ -18,15 +18,18 @@ vim.opt.runtimepath:append('.') -- needed on CI vim.fn.mkdir(vim.fn.stdpath('cache'), 'p') -local done = false +local ok = nil require('nvim-treesitter.install').install( #parsers > 0 and parsers or 'all', { force = true, generate = generate, max_jobs = max_jobs }, - function() - done = true + function(success) + ok = success end ) vim.wait(6000000, function() - return done + return ok ~= nil end) +if not ok then + vim.cmd.cq() +end |
