Skip to content

Commit b522862

Browse files
committed
chore: clean up healthcheck
1 parent dabbcd2 commit b522862

File tree

1 file changed

+4
-26
lines changed

1 file changed

+4
-26
lines changed

lua/neorg/health.lua

+4-26
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ return {
5959
)
6060
)
6161
else
62-
vim.health.ok(string.format("Module declaration `%s` is well-formed", key))
62+
vim.health.ok(string.format("Module declaration for `%s` is well-formed", key))
6363
end
6464
end
6565

@@ -71,32 +71,10 @@ return {
7171

7272
vim.health.info("Checking existence of dependencies...")
7373

74-
if pcall(require, "lazy") then
75-
if not (pcall(require, "luarocks-nvim")) then
76-
vim.health.error(
77-
"Required dependency `vhyrro/luarocks.nvim` not found! Neither `theHamsta/nvim_rocks` nor `camspiers/luarocks` are compatible. Check installation instructions in the README for how to fix the error."
78-
)
79-
else
80-
vim.health.ok("Required dependency `vhyrro/luarocks` found!")
81-
82-
vim.health.info("Checking existence of luarocks dependencies...")
83-
84-
local has_lua_utils = (pcall(require, "lua-utils"))
85-
86-
if not has_lua_utils then
87-
vim.health.error(
88-
"Critical dependency `lua-utils.nvim` not found! Please run `:Lazy build luarocks.nvim` and then `:Lazy build neorg`! Neorg will refuse to load."
89-
)
90-
else
91-
vim.health.ok("Critical dependencies are installed. You are free to use Neorg!")
92-
vim.health.warn("If you ever encounter errors please rerun `:Lazy build neorg` again :)")
93-
end
94-
end
74+
if vim.fn.executable("luarocks") then
75+
vim.health.ok("`luarocks` is installed.")
9576
else
96-
vim.health.ok("Using plugin manager other than lazy, no need for the `vhyrro/luarocks.nvim` dependency.")
97-
vim.health.warn(
98-
"If you are on an unsupported plugin manager you may still need the plugin for Neorg to function."
99-
)
77+
vim.health.error("`luarocks` not installed on your system! Please consult the Neorg README for installation instructions.")
10078
end
10179
end,
10280
}

0 commit comments

Comments
 (0)