neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 478273a4233d10b2ab898f1d38f4cfd491acc454
parent a75ef40f4cde43f680fe5f4f9cf9a657312251e9
Author: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Date:   Fri, 16 Feb 2024 14:00:19 -0600

fix: fix iter_matches call in query linter (#27496)


Diffstat:
Mruntime/lua/vim/treesitter/_query_linter.lua | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runtime/lua/vim/treesitter/_query_linter.lua b/runtime/lua/vim/treesitter/_query_linter.lua @@ -122,7 +122,7 @@ local parse = vim.func._memoize(hash_parse, function(node, buf, lang) end) --- @param buf integer ---- @param match table<integer,TSNode[]> +--- @param match TSMatch --- @param query Query --- @param lang_context QueryLinterLanguageContext --- @param diagnostics Diagnostic[] @@ -175,7 +175,7 @@ function M.lint(buf, opts) parser:parse() parser:for_each_tree(function(tree, ltree) 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 = { lang = lang, parser_info = parser_info,