Skip to content

Commit

Permalink
fix: dont error in checkhealth if nvim-treesitter is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 21, 2022
1 parent 4e03e16 commit 044767a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/noice/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ function M.check(opts)
)
end

local _, ts = pcall(require, "nvim-treesitter.parsers")
local ok, ts = pcall(_G.require, "nvim-treesitter.parsers")

if ts then
if ok then
log.ok("**treesitter-nvim** is installed")
for _, ft in ipairs({ "vim", "regex", "lua", "bash", "markdown", "markdown_inline" }) do
if ts.has_parser(ft) then
Expand Down

0 comments on commit 044767a

Please sign in to comment.