Skip to content

Commit

Permalink
fix(treesitter): fixed treesitter.query.get. Fixes #539
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jul 18, 2023
1 parent bfd2368 commit e91a31c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/noice/text/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ end

function M.get_query(lang)
if not M.queries[lang] then
M.queries[lang] = vim.treesitter.query.get and vim.treesitter.query.get(lang, "highlights")
or vim.treesitter.query.get_query(lang, "highlights")
M.queries[lang] = (vim.treesitter.query.get or vim.treesitter.query.get_query)(lang, "highlights")
end
return M.queries[lang]
end
Expand Down

0 comments on commit e91a31c

Please sign in to comment.