mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat: rewrite of spec resolving
This commit is contained in:
parent
8d35e60eeb
commit
75ffe56f70
9 changed files with 558 additions and 429 deletions
|
@ -59,7 +59,6 @@ function M.check()
|
|||
else
|
||||
for _, plugin in pairs(spec.plugins) do
|
||||
M.check_valid(plugin)
|
||||
M.check_override(plugin)
|
||||
end
|
||||
if #spec.notifs > 0 then
|
||||
error("Issues were reported when loading your specs:")
|
||||
|
@ -88,23 +87,6 @@ function M.check_valid(plugin)
|
|||
end
|
||||
end
|
||||
|
||||
---@param plugin LazyPlugin
|
||||
function M.check_override(plugin)
|
||||
if not plugin._.super then
|
||||
return
|
||||
end
|
||||
|
||||
local Handler = require("lazy.core.handler")
|
||||
local skip = { "dependencies", "_", "opts", 1 }
|
||||
vim.list_extend(skip, vim.tbl_values(Handler.types))
|
||||
|
||||
for key, value in pairs(plugin._.super) do
|
||||
if not vim.tbl_contains(skip, key) and plugin[key] and plugin[key] ~= value then
|
||||
warn("{" .. plugin.name .. "}: overriding <" .. key .. ">")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
M.valid = {
|
||||
1,
|
||||
"_",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue