feat(spec): added import to import other plugin modules

This commit is contained in:
Folke Lemaitre 2023-01-02 09:44:09 +01:00
parent 313015fdb4
commit 919b7f5de3
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
7 changed files with 74 additions and 46 deletions

View file

@ -48,7 +48,7 @@ function M.check()
"cond",
"_",
}
local spec = Config.parsed
local spec = Config.spec
for _, plugin in pairs(spec.plugins) do
for key in pairs(plugin) do
if not vim.tbl_contains(valid, key) then
@ -58,12 +58,16 @@ function M.check()
end
end
end
if #spec.errors > 0 then
vim.health.report_error("Errors were reported when loading your specs:")
for _, error in ipairs(spec.errors) do
local lines = vim.split(error, "\n")
if #spec.notifs > 0 then
vim.health.report_error("Issues were reported when loading your specs:")
for _, notif in ipairs(spec.notifs) do
local lines = vim.split(notif.msg, "\n")
for _, line in ipairs(lines) do
vim.health.report_error(line)
if notif.level == vim.log.levels.ERROR then
vim.health.report_error(line)
else
vim.health.report_warn(line)
end
end
end
end