File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -575,6 +575,12 @@ The following user events will be triggered:
575
575
- ** LazyClean** : after a clean
576
576
- ** LazyCheck** : after checking for updates
577
577
- ** LazyLog** : after running log
578
+ - ** LazySyncPre** : before running sync
579
+ - ** LazyInstallPre** : before an install
580
+ - ** LazyUpdatePre** : before an update
581
+ - ** LazyCleanPre** : before a clean
582
+ - ** LazyCheckPre** : before checking for updates
583
+ - ** LazyLogPre** : before running log
578
584
- ** LazyReload** : triggered by change detection after reloading plugin specs
579
585
- ** VeryLazy** : triggered after ` LazyDone ` and processing ` VimEnter ` auto commands
580
586
- ** LazyVimStarted** : triggered after ` UIEnter ` when ` require("lazy").stats().startuptime ` has been calculated.
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ local M = {}
18
18
function M .run (ropts , opts )
19
19
opts = opts or {}
20
20
21
+ local mode = opts .mode
22
+ local event = mode and (" Lazy" .. mode :sub (1 , 1 ):upper () .. mode :sub (2 ))
23
+
24
+ if event then
25
+ vim .api .nvim_exec_autocmds (" User" , { pattern = event .. " Pre" , modeline = false })
26
+ end
27
+
21
28
if opts .plugins then
22
29
--- @param plugin string | LazyPlugin
23
30
opts .plugins = vim .tbl_map (function (plugin )
@@ -49,9 +56,7 @@ function M.run(ropts, opts)
49
56
vim .api .nvim_exec_autocmds (" User" , { pattern = " LazyRender" , modeline = false })
50
57
Plugin .update_state ()
51
58
require (" lazy.manage.checker" ).fast_check ({ report = false })
52
- local mode = opts .mode
53
- if mode then
54
- local event = " Lazy" .. mode :sub (1 , 1 ):upper () .. mode :sub (2 )
59
+ if event then
55
60
vim .api .nvim_exec_autocmds (" User" , { pattern = event , modeline = false })
56
61
end
57
62
end )
You can’t perform that action at this time.
0 commit comments