Skip to content

Commit

Permalink
fix(treesitter): use query.parse (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazymerlyn authored Apr 2, 2023
1 parent 27cb5eb commit 734efe8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/neotest/lib/treesitter/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ end
---@return table
function neotest.lib.treesitter.normalise_query(lang, query)
if type(query) == "string" then
query = vim.treesitter.parse_query(lang, query)
local parse_query = vim.treesitter.query.parse or vim.treesitter.parse_query
query = parse_query(lang, query)
end
return query
end
Expand Down

0 comments on commit 734efe8

Please sign in to comment.