Skip to content

Commit 695a058

Browse files
committed
feat(plugin): allow loading specs without pkg
1 parent 7af8a31 commit 695a058

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lua/lazy/core/plugin.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ M.Spec = Spec
2121
M.LOCAL_SPEC = ".lazy.lua"
2222

2323
---@param spec? LazySpec
24-
---@param opts? {optional?:boolean}
24+
---@param opts? {optional?:boolean, pkg?:boolean}
2525
function Spec.new(spec, opts)
2626
local self = setmetatable({}, Spec)
2727
self.meta = Meta.new(self)
@@ -30,7 +30,9 @@ function Spec.new(spec, opts)
3030
self.notifs = {}
3131
self.ignore_installed = {}
3232
self.optional = opts and opts.optional
33-
self.meta:load_pkgs()
33+
if not (opts and opts.pkg == false) then
34+
self.meta:load_pkgs()
35+
end
3436
if spec then
3537
self:parse(spec)
3638
end

0 commit comments

Comments
 (0)