mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
fix(CI): ensure parsers that don't require tree-sitter CLI are installed
This commit is contained in:
parent
ddc0f1b606
commit
966096b502
1 changed files with 13 additions and 0 deletions
|
|
@ -58,6 +58,19 @@ end
|
||||||
|
|
||||||
|
|
||||||
local ok, err = pcall(do_check)
|
local ok, err = pcall(do_check)
|
||||||
|
|
||||||
|
for k, v in pairs(require 'nvim-treesitter.parsers'.get_parser_configs()) do
|
||||||
|
if not require 'nvim-treesitter.parsers'.has_parser(k) then
|
||||||
|
-- On CI all parsers that can be installed from C files should be installed
|
||||||
|
if vim.env.CI and not v.install_info.requires_generate_from_grammar then
|
||||||
|
print('Error: parser for '..k..' is not installed')
|
||||||
|
vim.cmd('cq')
|
||||||
|
else
|
||||||
|
print('Warning: parser for '..k..' is not installed')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if ok then
|
if ok then
|
||||||
print('Check successful!\n')
|
print('Check successful!\n')
|
||||||
vim.cmd('q')
|
vim.cmd('q')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue