diff --git a/lua/lazy/core/handler/init.lua b/lua/lazy/core/handler/init.lua index 5e9074b..af85820 100644 --- a/lua/lazy/core/handler/init.lua +++ b/lua/lazy/core/handler/init.lua @@ -25,7 +25,7 @@ function M.setup() end for _, plugin in pairs(Config.plugins) do Util.try(function() - M.enable(plugin) + M.enable(plugin, true) end, "Failed to setup handlers for " .. plugin.name) end end @@ -40,8 +40,9 @@ function M.disable(plugin) end ---@param plugin LazyPlugin -function M.enable(plugin) - if not plugin._.loaded then +---@param force? boolean +function M.enable(plugin, force) + if force or not plugin._.loaded then for type, handler in pairs(M.handlers) do if plugin[type] then handler:add(plugin) diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index 6e3b653..03f1105 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -70,7 +70,7 @@ function M.install_missing() end end require("lazy.manage").install({ wait = true, lockfile = true }) - -- remove and installed plugins from indexed, so cache will index again + -- remove any installed plugins from indexed, so cache will index again for _, p in pairs(Config.plugins) do if p._.installed then Cache.reset(p.dir)