Skip to content

Commit

Permalink
fix(treesitter): handle existing reverse lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarriga committed Feb 7, 2022
1 parent 2a19a5d commit 9a1c584
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/neotest/lib/treesitter/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ local function collect(file_path, query, buf, root, opts)
name = path_elems[#path_elems],
range = { root:range() },
})
vim.tbl_add_reverse_lookup(query.captures)
pcall(vim.tbl_add_reverse_lookup, query.captures)
for _, match in query:iter_matches(root, buf) do
local type = get_query_type(query, match)
if type then
Expand Down

0 comments on commit 9a1c584

Please sign in to comment.