mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
fix: properly setup handlers when loading a plugin before startup (build) etc
This commit is contained in:
parent
2a9354c7d2
commit
24f6b6f1c7
2 changed files with 17 additions and 5 deletions
|
@ -34,6 +34,7 @@ function M.setup()
|
|||
|
||||
-- load the plugins
|
||||
Plugin.load()
|
||||
Handler.init()
|
||||
|
||||
-- install missing plugins
|
||||
if Config.options.install.missing then
|
||||
|
@ -301,6 +302,12 @@ function M._load(plugin, reason, opts)
|
|||
return
|
||||
end
|
||||
|
||||
if not Handler.did_setup then
|
||||
Util.try(function()
|
||||
Handler.enable(plugin)
|
||||
end, "Failed to setup handlers for " .. plugin.name)
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: assign-type-mismatch
|
||||
plugin._.loaded = {}
|
||||
for k, v in pairs(reason) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue