fix(extras): don't load pkgs when parsing specs for LazyExtras
This commit is contained in:
@ -84,13 +84,13 @@ end
|
|||||||
---@param source LazyExtraSource
|
---@param source LazyExtraSource
|
||||||
function M.get_extra(source, modname)
|
function M.get_extra(source, modname)
|
||||||
local enabled = vim.tbl_contains(M.state, modname)
|
local enabled = vim.tbl_contains(M.state, modname)
|
||||||
local spec = Plugin.Spec.new(nil, { optional = true })
|
local spec = Plugin.Spec.new(nil, { optional = true, pkg = false })
|
||||||
spec:parse({ import = modname })
|
spec:parse({ import = modname })
|
||||||
local imports = vim.tbl_filter(function(x)
|
local imports = vim.tbl_filter(function(x)
|
||||||
return x ~= modname
|
return x ~= modname
|
||||||
end, spec.modules)
|
end, spec.modules)
|
||||||
if #imports > 0 then
|
if #imports > 0 then
|
||||||
spec = Plugin.Spec.new(nil, { optional = true })
|
spec = Plugin.Spec.new(nil, { optional = true, pkg = false })
|
||||||
spec.modules = vim.deepcopy(imports)
|
spec.modules = vim.deepcopy(imports)
|
||||||
spec:parse({ import = modname })
|
spec:parse({ import = modname })
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user