mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
fix(treesitter): suppress get_parser warnings via opts.error
This commit is contained in:
committed by
Christian Clason
parent
7b71fdbc1e
commit
0f067cd34d
@@ -177,7 +177,7 @@ function M.lint(buf, opts)
|
||||
is_first_lang = i == 1,
|
||||
}
|
||||
|
||||
local parser = assert(vim.treesitter._get_parser(buf), 'query parser not found.')
|
||||
local parser = assert(vim.treesitter.get_parser(buf, nil, { error = false }))
|
||||
parser:parse()
|
||||
parser:for_each_tree(function(tree, ltree)
|
||||
if ltree:lang() == 'query' then
|
||||
|
||||
Reference in New Issue
Block a user