refactor(health): refactor
This commit is contained in:
parent
2dd45be37f
commit
9881da4db7
1 changed files with 2 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ local u = require "gopher._utils.health_util"
|
||||||
|
|
||||||
local deps = {
|
local deps = {
|
||||||
plugin = {
|
plugin = {
|
||||||
{ lib = "nvim-treesitter", msg = "required for everything in gopher.nvim", optional = false },
|
{ lib = "nvim-treesitter", msg = "required for basically everything in gopher.nvim" },
|
||||||
},
|
},
|
||||||
bin = {
|
bin = {
|
||||||
{
|
{
|
||||||
|
|
@ -31,14 +31,10 @@ function health.check()
|
||||||
for _, plugin in ipairs(deps.plugin) do
|
for _, plugin in ipairs(deps.plugin) do
|
||||||
if u.is_lualib_found(plugin.lib) then
|
if u.is_lualib_found(plugin.lib) then
|
||||||
u.ok(plugin.lib .. " installed")
|
u.ok(plugin.lib .. " installed")
|
||||||
else
|
|
||||||
if plugin.optional then
|
|
||||||
u.warn(plugin.lib .. " not found, " .. plugin.msg)
|
|
||||||
else
|
else
|
||||||
u.error(plugin.lib .. " not found, " .. plugin.msg)
|
u.error(plugin.lib .. " not found, " .. plugin.msg)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
u.start "required binaries"
|
u.start "required binaries"
|
||||||
u.info "all those binaries can be installed by `:GoInstallDeps`"
|
u.info "all those binaries can be installed by `:GoInstallDeps`"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue