Skip to content

Commit

Permalink
fix(handler): properly show errors generated by setting up handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 2, 2023
1 parent 6ff480b commit 4d77cf2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/lazy/core/handler/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
local Util = require("lazy.core.util")
local Config = require("lazy.core.config")

---@class LazyHandler
Expand All @@ -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

Expand Down

0 comments on commit 4d77cf2

Please sign in to comment.