mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
feat(extras): big rework of default extras
This commit is contained in:
parent
0416376733
commit
525377dee9
13 changed files with 222 additions and 200 deletions
|
@ -79,7 +79,16 @@ function M.lazy_file()
|
|||
end
|
||||
|
||||
function M.fix_imports()
|
||||
local defaults ---@type table<string, LazyVimDefault>
|
||||
Plugin.Spec.import = LazyVim.inject.args(Plugin.Spec.import, function(_, spec)
|
||||
if LazyVim.config.json_loaded then
|
||||
-- extra disabled by defaults?
|
||||
defaults = defaults or LazyVim.config.get_defaults()
|
||||
local def = defaults[spec.import]
|
||||
if def and def.enabled == false then
|
||||
return false
|
||||
end
|
||||
end
|
||||
local dep = M.deprecated_extras[spec and spec.import]
|
||||
if dep then
|
||||
dep = dep .. "\n" .. "Please remove the extra from `lazyvim.json` to hide this warning."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue