From 4d77cf2efea3ddec1bc2a335f90bf3a1cfe19db2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 2 Jan 2023 09:36:52 +0100 Subject: [PATCH] fix(handler): properly show errors generated by setting up handlers --- lua/lazy/core/handler/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/handler/init.lua b/lua/lazy/core/handler/init.lua index 99568f4..0935f51 100644 --- a/lua/lazy/core/handler/init.lua +++ b/lua/lazy/core/handler/init.lua @@ -1,3 +1,4 @@ +local Util = require("lazy.core.util") local Config = require("lazy.core.config") ---@class LazyHandler @@ -23,7 +24,9 @@ function M.setup() M.handlers[type] = M.new(type) end for _, plugin in pairs(Config.plugins) do - M.enable(plugin) + Util.try(function() + M.enable(plugin) + end, "Failed to setup handlers for " .. plugin.name) end end