mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
fix: fix iter_matches call in query linter (#27496)
This commit is contained in:
parent
a75ef40f4c
commit
478273a423
@ -122,7 +122,7 @@ local parse = vim.func._memoize(hash_parse, function(node, buf, lang)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
--- @param buf integer
|
--- @param buf integer
|
||||||
--- @param match table<integer,TSNode[]>
|
--- @param match TSMatch
|
||||||
--- @param query Query
|
--- @param query Query
|
||||||
--- @param lang_context QueryLinterLanguageContext
|
--- @param lang_context QueryLinterLanguageContext
|
||||||
--- @param diagnostics Diagnostic[]
|
--- @param diagnostics Diagnostic[]
|
||||||
@ -175,7 +175,7 @@ function M.lint(buf, opts)
|
|||||||
parser:parse()
|
parser:parse()
|
||||||
parser:for_each_tree(function(tree, ltree)
|
parser:for_each_tree(function(tree, ltree)
|
||||||
if ltree:lang() == 'query' then
|
if ltree:lang() == 'query' then
|
||||||
for _, match, _ in query:iter_matches(tree:root(), buf, 0, -1) do
|
for _, match, _ in query:iter_matches(tree:root(), buf, 0, -1, { all = true }) do
|
||||||
local lang_context = {
|
local lang_context = {
|
||||||
lang = lang,
|
lang = lang,
|
||||||
parser_info = parser_info,
|
parser_info = parser_info,
|
||||||
|
Loading…
Reference in New Issue
Block a user