From 695a05872a5b44e366e5532eb2fe38a64fae8357 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 29 Jun 2024 10:18:31 +0200 Subject: [PATCH] feat(plugin): allow loading specs without pkg --- lua/lazy/core/plugin.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index 84660e6..f917b19 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -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