diff --git a/lua/nvim-treesitter/query.lua b/lua/nvim-treesitter/query.lua index be650c795..e9f671f93 100644 --- a/lua/nvim-treesitter/query.lua +++ b/lua/nvim-treesitter/query.lua @@ -54,7 +54,7 @@ function M.iter_prepared_matches(query, qnode, bufnr, start_row, end_row) local name = query.captures[id] -- name of the capture in the query if name ~= nil then local path = split(name) - insert_to_path(prepared_match, path, node) + insert_to_path(prepared_match, path, { node=node }) end end