mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 12:56:46 +00:00
feat: cleanup keys/cmd handlers when loading a plugin
This commit is contained in:
parent
c98e722fa4
commit
3f517abfa4
6 changed files with 154 additions and 99 deletions
|
@ -1,5 +1,6 @@
|
|||
local Util = require("lazy.core.util")
|
||||
local Config = require("lazy.core.config")
|
||||
local Handler = require("lazy.core.handler")
|
||||
|
||||
local M = {}
|
||||
|
||||
|
@ -27,7 +28,6 @@ function M.setup()
|
|||
|
||||
-- setup handlers
|
||||
Util.track("handlers")
|
||||
local Handler = require("lazy.core.handler")
|
||||
Handler.setup()
|
||||
Util.track()
|
||||
|
||||
|
@ -81,6 +81,7 @@ function M.load(plugins, reason)
|
|||
table.insert(M.loading, plugin)
|
||||
|
||||
Util.track({ plugin = plugin.name, start = reason.start })
|
||||
Handler.cleanup(plugin)
|
||||
|
||||
vim.opt.runtimepath:prepend(plugin.dir)
|
||||
if not M.init_done then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue