mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-28 03:24:13 +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
|
@ -87,6 +87,15 @@ function Spec:add(plugin, results, is_dep)
|
|||
plugin.cmd = type(plugin.cmd) == "string" and { plugin.cmd } or plugin.cmd
|
||||
plugin.ft = type(plugin.ft) == "string" and { plugin.ft } or plugin.ft
|
||||
|
||||
if type(plugin.config) == "table" then
|
||||
self:warn(
|
||||
"{" .. plugin.name .. "}: setting a table to `Plugin.config` is deprecated. Please use `Plugin.opts` instead"
|
||||
)
|
||||
---@diagnostic disable-next-line: assign-type-mismatch
|
||||
plugin.opts = plugin.config
|
||||
plugin.config = nil
|
||||
end
|
||||
|
||||
plugin._ = {}
|
||||
plugin._.dep = is_dep
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue