mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat(spec)!: setting a table to Plugin.config
is now deprecated. Please use Plugin.opts
instead. (backward compatible for now)
This commit is contained in:
parent
6a31b97e37
commit
7260a2b28b
7 changed files with 150 additions and 59 deletions
|
@ -68,8 +68,12 @@ function M.check_override(plugin)
|
|||
return
|
||||
end
|
||||
|
||||
local Handler = require("lazy.core.handler")
|
||||
local skip = { "dependencies", "_", "opts" }
|
||||
vim.list_extend(skip, vim.tbl_values(Handler.types))
|
||||
|
||||
for key, value in pairs(plugin._.super) do
|
||||
if key ~= "_" and plugin[key] and plugin[key] ~= value then
|
||||
if not vim.tbl_contains(skip, key) and plugin[key] and plugin[key] ~= value then
|
||||
vim.health.report_warn("{" .. plugin.name .. "}: overriding <" .. key .. ">")
|
||||
end
|
||||
end
|
||||
|
@ -77,29 +81,31 @@ end
|
|||
|
||||
M.valid = {
|
||||
1,
|
||||
"name",
|
||||
"url",
|
||||
"enabled",
|
||||
"lazy",
|
||||
"dev",
|
||||
"dependencies",
|
||||
"init",
|
||||
"config",
|
||||
"build",
|
||||
"branch",
|
||||
"tag",
|
||||
"commit",
|
||||
"version",
|
||||
"module",
|
||||
"pin",
|
||||
"cmd",
|
||||
"event",
|
||||
"keys",
|
||||
"ft",
|
||||
"dir",
|
||||
"priority",
|
||||
"cond",
|
||||
"_",
|
||||
"branch",
|
||||
"build",
|
||||
"cmd",
|
||||
"commit",
|
||||
"cond",
|
||||
"config",
|
||||
"dependencies",
|
||||
"dev",
|
||||
"dir",
|
||||
"enabled",
|
||||
"event",
|
||||
"ft",
|
||||
"import",
|
||||
"init",
|
||||
"keys",
|
||||
"lazy",
|
||||
"module",
|
||||
"name",
|
||||
"opts",
|
||||
"pin",
|
||||
"priority",
|
||||
"tag",
|
||||
"url",
|
||||
"version",
|
||||
}
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue