mirror of https://github.com/folke/lazy.nvim.git
feat(plugin): allow loading specs without pkg
This commit is contained in:
parent
7af8a317e2
commit
695a05872a
|
@ -21,7 +21,7 @@ M.Spec = Spec
|
||||||
M.LOCAL_SPEC = ".lazy.lua"
|
M.LOCAL_SPEC = ".lazy.lua"
|
||||||
|
|
||||||
---@param spec? LazySpec
|
---@param spec? LazySpec
|
||||||
---@param opts? {optional?:boolean}
|
---@param opts? {optional?:boolean, pkg?:boolean}
|
||||||
function Spec.new(spec, opts)
|
function Spec.new(spec, opts)
|
||||||
local self = setmetatable({}, Spec)
|
local self = setmetatable({}, Spec)
|
||||||
self.meta = Meta.new(self)
|
self.meta = Meta.new(self)
|
||||||
|
@ -30,7 +30,9 @@ function Spec.new(spec, opts)
|
||||||
self.notifs = {}
|
self.notifs = {}
|
||||||
self.ignore_installed = {}
|
self.ignore_installed = {}
|
||||||
self.optional = opts and opts.optional
|
self.optional = opts and opts.optional
|
||||||
|
if not (opts and opts.pkg == false) then
|
||||||
self.meta:load_pkgs()
|
self.meta:load_pkgs()
|
||||||
|
end
|
||||||
if spec then
|
if spec then
|
||||||
self:parse(spec)
|
self:parse(spec)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue