Skip to content

Commit

Permalink
feat(plugin): allow loading specs without pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 29, 2024
1 parent 7af8a31 commit 695a058
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/lazy/core/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 695a058

Please sign in to comment.