mirror of https://github.com/folke/lazy.nvim.git
fix(health): show error if setup didn't run
* Fix back bootstrapping and healthcheck for fresh install with no packages to fetch. * Revert changes to bootstrapping, make checkhealth produce more meaningful message.
This commit is contained in:
parent
903f0fe542
commit
0c7b41872e
|
@ -53,19 +53,23 @@ function M.check()
|
||||||
end
|
end
|
||||||
|
|
||||||
local spec = Config.spec
|
local spec = Config.spec
|
||||||
for _, plugin in pairs(spec.plugins) do
|
if spec == nil then
|
||||||
M.check_valid(plugin)
|
error("No plugins loaded. Did you forget to run `require(\"lazy\").setup()`?")
|
||||||
M.check_override(plugin)
|
else
|
||||||
end
|
for _, plugin in pairs(spec.plugins) do
|
||||||
if #spec.notifs > 0 then
|
M.check_valid(plugin)
|
||||||
error("Issues were reported when loading your specs:")
|
M.check_override(plugin)
|
||||||
for _, notif in ipairs(spec.notifs) do
|
end
|
||||||
local lines = vim.split(notif.msg, "\n")
|
if #spec.notifs > 0 then
|
||||||
for _, line in ipairs(lines) do
|
error("Issues were reported when loading your specs:")
|
||||||
if notif.level == vim.log.levels.ERROR then
|
for _, notif in ipairs(spec.notifs) do
|
||||||
error(line)
|
local lines = vim.split(notif.msg, "\n")
|
||||||
else
|
for _, line in ipairs(lines) do
|
||||||
warn(line)
|
if notif.level == vim.log.levels.ERROR then
|
||||||
|
error(line)
|
||||||
|
else
|
||||||
|
warn(line)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue