refactor(health): remove treesitter from required plugins

This commit is contained in:
Oleksandr Smirnov 2025-03-27 23:04:26 +02:00
parent 847c79ab76
commit d4df23b5e3
No known key found for this signature in database

View file

@ -2,9 +2,6 @@ local health = {}
local cmd = require("gopher.config").commands
local deps = {
plugin = {
{ lib = "nvim-treesitter", msg = "required for everything in gopher.nvim" },
},
bin = {
{
bin = cmd.go,
@ -25,13 +22,6 @@ local deps = {
},
}
---@param module string
---@return boolean
local function is_lualib_found(module)
local is_found, _ = pcall(require, module)
return is_found
end
---@param bin string
---@return boolean
local function is_binary_found(bin)
@ -46,15 +36,6 @@ local function is_treesitter_parser_available(ft)
end
function health.check()
vim.health.start "required plugins"
for _, plugin in ipairs(deps.plugin) do
if is_lualib_found(plugin.lib) then
vim.health.ok(plugin.lib .. " installed")
else
vim.health.error(plugin.lib .. " not found, " .. plugin.msg)
end
end
vim.health.start "required binaries"
vim.health.info "all those binaries can be installed by `:GoInstallDeps`"
for _, bin in ipairs(deps.bin) do