mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20:02 -04:00
Skip parsers in query check that are not installed
This commit is contained in:
parent
4b0ba7781f
commit
28bc7a0703
1 changed files with 18 additions and 14 deletions
|
|
@ -29,6 +29,7 @@ local function do_check()
|
||||||
local last_error
|
local last_error
|
||||||
|
|
||||||
for _, lang in pairs(parsers) do
|
for _, lang in pairs(parsers) do
|
||||||
|
if parsers.has_parser(lang) then
|
||||||
for _, query_type in pairs(query_types) do
|
for _, query_type in pairs(query_types) do
|
||||||
print('Checking '..lang..' '..query_type)
|
print('Checking '..lang..' '..query_type)
|
||||||
local ok, query = pcall(queries.get_query,lang, query_type)
|
local ok, query = pcall(queries.get_query,lang, query_type)
|
||||||
|
|
@ -48,6 +49,9 @@ local function do_check()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
print("No parser for "..lang.." installed! Skipping...")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if last_error then
|
if last_error then
|
||||||
print()
|
print()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue