fix(health): remove nvim-treesitter dependency (#44)

This does make the neovim requirement for health 0.9.0, but
nvim-treesitter will soon deprecate most of its "plugin" functionality
and solely serve as an installer of parsers, and any plugin
functionality should rely on the upstream `vim.treesitter` module
This commit is contained in:
Amaan Qureshi 2024-07-06 18:10:55 -04:00 committed by GitHub
parent f482938d8c
commit 3374276df2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 10 deletions

View File

@ -25,17 +25,10 @@ function M.check()
health_warn(msg:format(...))
end
local _, ts = pcall(require, "nvim-treesitter.parsers")
if ts then
ok("**treesitter-nvim** is installed")
if ts.has_parser("jsonc") then
ok("**TreeSitter jsonc** parser is installed")
else
warn("**TreeSitter jsonc** parser is not installed. Highlighting of jsonc files might be broken")
end
if pcall(vim.treesitter.get_string_parser, "", "jsonc") then
ok("**jsonc** parser for tree-sitter is installed")
else
warn("**treesitter-nvim** not installed. Highlighting of jsonc files might be broken")
warn("**jsonc** parser for tree-sitter is not installed. Jsonc highlighting might be broken")
end
if pcall(require, "neodev") then