Skip to content

Commit

Permalink
fix: support older Neovim versions
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 21, 2023
1 parent ddf9f52 commit 4a1ec5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/noice/text/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ end

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

0 comments on commit 4a1ec5e

Please sign in to comment.