fix(extras): disable import handling when loading :LazyExtras + changed some recommendations

This commit is contained in:
Folke Lemaitre 2025-02-10 23:27:24 +01:00
parent 66981fe5b2
commit 121a2e27ef
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
5 changed files with 23 additions and 23 deletions

View file

@ -5,6 +5,7 @@ local M = {}
---@type string[]
M.core_imports = {}
M.handle_defaults = true
M.lazy_file_events = { "BufReadPost", "BufNewFile", "BufWritePre" }
@ -81,7 +82,7 @@ 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
if M.handle_defaults and LazyVim.config.json.loaded then
-- extra disabled by defaults?
defaults = defaults or LazyVim.config.get_defaults()
local def = defaults[spec.import]