feat: adding LazyPreSync event

This commit is contained in:
Jay Patel 2023-06-04 19:41:43 -04:00
commit 05c44f07d3
3 changed files with 4 additions and 0 deletions

View file

@ -569,6 +569,7 @@ require("lualine").setup({
The following user events will be triggered:
- **LazyDone**: when lazy has finished starting up and loaded your config
- **LazyPreSync**: before running sync
- **LazySync**: after running sync
- **LazyInstall**: after an install
- **LazyUpdate**: after an update

View file

@ -671,6 +671,7 @@ USER EVENTS ~
The following user events will be triggered:
- **LazyDone**when lazy has finished starting up and loaded your config
- **LazyPreSync**: before running sync
- **LazySync**after running sync
- **LazyInstall**after an install
- **LazyUpdate**after an update

View file

@ -112,6 +112,7 @@ function M.update(opts)
require("lazy.help").update()
end)
end
--
---@param opts? ManagerOpts
function M.restore(opts)
@ -168,6 +169,7 @@ function M.sync(opts)
M.clear()
opts.clear = false
end
vim.api.nvim_exec_autocmds("User", { pattern = "LazyPreSync", modeline = false })
if opts.show ~= false then
vim.schedule(function()
require("lazy.view").show("sync")