mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
parent
10d4371745
commit
0bca18de5d
2 changed files with 14 additions and 3 deletions
|
@ -18,6 +18,13 @@ local M = {}
|
|||
function M.run(ropts, opts)
|
||||
opts = opts or {}
|
||||
|
||||
local mode = opts.mode
|
||||
local event = mode and ("Lazy" .. mode:sub(1, 1):upper() .. mode:sub(2))
|
||||
|
||||
if event then
|
||||
vim.api.nvim_exec_autocmds("User", { pattern = event .. "Pre", modeline = false })
|
||||
end
|
||||
|
||||
if opts.plugins then
|
||||
---@param plugin string|LazyPlugin
|
||||
opts.plugins = vim.tbl_map(function(plugin)
|
||||
|
@ -49,9 +56,7 @@ function M.run(ropts, opts)
|
|||
vim.api.nvim_exec_autocmds("User", { pattern = "LazyRender", modeline = false })
|
||||
Plugin.update_state()
|
||||
require("lazy.manage.checker").fast_check({ report = false })
|
||||
local mode = opts.mode
|
||||
if mode then
|
||||
local event = "Lazy" .. mode:sub(1, 1):upper() .. mode:sub(2)
|
||||
if event then
|
||||
vim.api.nvim_exec_autocmds("User", { pattern = event, modeline = false })
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue