-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: user autocmd event when syncing/updating is complete #135
Comments
for headless install you can do You can also use the API and pass in The user commands can be executed with a bang, which makes them also wait till they finished. It's all in the docs. What's your specific use-case? There is also |
@folke, it would be useful for pseudo hot-reloading, e,g. refreshing elements of the UI after the plugins have been updated. vim.api.nvim_create_autocmd("User", {
pattern = "LazyComplete",
once = true,
callback = function()
vim.api.nvim_exec_autocmds("ColorScheme", {pattern = "*"})
-- vim.notify("Update/Sync/Something is complete!")
end,
}) |
📆 User EventsThe following user events will be triggered:
|
Pardon @folke but isn't |
Right, need to add that one to the list |
Did you check docs the docs?
Is your feature request related to a problem? Please describe.
It would be nice to have autocmd user events when lazy finishes updating/installing plugins so the user can easily trigger things to happen.
Describe the solution you'd like
After an update/install is finished and all of the install handlers are finished do something like
vim.cmd("do User LazyComplete")
or some other name to indicate it has finished updating/installing plugins.Describe alternatives you've considered
I'm not sure of any other alternatives to be able to tell when Lazy is finished.
Additional context
This is also useful if a user wants to do a headless setup of their neovim config on a fresh install with something like
nvim --headless -c 'autocmd User LazyComplete quitall'
This is also something that other package managers do like Packer which emits the user event
PackerComplete
The text was updated successfully, but these errors were encountered: