feat(plugin): allow loading specs without pkg

This commit is contained in:
Folke Lemaitre 2024-06-29 10:18:31 +02:00
parent 7af8a317e2
commit 695a05872a
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 4 additions and 2 deletions

View File

@ -21,7 +21,7 @@ M.Spec = Spec
M.LOCAL_SPEC = ".lazy.lua"
---@param spec? LazySpec
---@param opts? {optional?:boolean}
---@param opts? {optional?:boolean, pkg?:boolean}
function Spec.new(spec, opts)
local self = setmetatable({}, Spec)
self.meta = Meta.new(self)
@ -30,7 +30,9 @@ function Spec.new(spec, opts)
self.notifs = {}
self.ignore_installed = {}
self.optional = opts and opts.optional
self.meta:load_pkgs()
if not (opts and opts.pkg == false) then
self.meta:load_pkgs()
end
if spec then
self:parse(spec)
end