From a2b05c38cc905c9e3473f0000ff42dbe791cb078 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 22 Jun 2024 22:18:47 +0200 Subject: [PATCH] feat(pkg): import package specs in the scope of the plugin --- lua/lazy/pkg/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazy/pkg/init.lua b/lua/lazy/pkg/init.lua index f09afbc..9858ad7 100644 --- a/lua/lazy/pkg/init.lua +++ b/lua/lazy/pkg/init.lua @@ -86,7 +86,11 @@ end function M.get_spec(plugin) local pkg = M.get(plugin) local spec = pkg and pkg.spec - return spec and type(spec) == "table" and vim.deepcopy(spec) or spec + if not spec then + return + end + spec = type(spec) == "table" and vim.deepcopy(spec) or spec + return { plugin.name, specs = spec } end return M