-
|
I am using chezmoi to manage my config and want to automatically add the My idea was to add an autocommand on the I have added the following autocommand: return {
"xvzc/chezmoi.nvim",
event = "VeryLazy",
-- Added this to see if it would recognize the event.
dependencies = {
"folke/lazy.nvim",
},
config = function()
vim.api.nvim_create_autocmd("LazyUpdate", {
group = vim.api.nvim_create_augroup("chezmoi_update_lock", { clear = true }),
callback = function()
local lock_file = vim.fn.stdpath("config") .. "/lazy-lock.json"
require("chezmoi.commands.__apply").execute({
targets = { lock_file },
})
end,
})
end,
}The problem is that
|
Beta Was this translation helpful? Give feedback.
Answered by
sharpchen
Oct 3, 2025
Replies: 1 comment 1 reply
-
|
Custom event names are actually matched by pattern when vim.api.nvim_create_autocmd('User', {
pattern = 'LazyUpdate',
callback = function(args) vim.print('foo') end,
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
rpbaptist
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Custom event names are actually matched by pattern when
Userevent is triggered.So you should do it like this: