add parse before for_each_tree

This commit is contained in:
Vladimir Sushkov 2025-10-13 23:19:40 +03:00
parent 42fc28ba91
commit 8a5582f67f

View file

@ -437,6 +437,7 @@ function M.get_capture_matches_recursively(bufnr, capture_or_fn, query_type)
local matches = {}
if parser then
parser:parse(false)
parser:for_each_tree(function(tree, lang_tree)
local lang = lang_tree:lang()
local capture, type_ = type_fn(lang, tree, lang_tree)