packer.nvim icon indicating copy to clipboard operation
packer.nvim copied to clipboard

Added note about nvim 0.7.0 lua autocmds

Open FredeEB opened this issue 2 years ago • 6 comments

neovim introduced native lua autocmds, so I though they'd be worth a mention.

I was considering adding an example with the callback field instead of command but couldn't find a lua variant of source, and doing it with vim.cmd would yield the same result as using command

FredeEB avatar Apr 29 '22 11:04 FredeEB

Consider creating augroup with { clear = true } before creating the autocmd. This will ensure that plugin reload autocmmand will be cleared before creation with each source. Duplicating autocommands can lead to unexpected results.

yehorb avatar Apr 29 '22 20:04 yehorb

@yehorb - TIL! Thanks. I updated the PR

FredeEB avatar Apr 29 '22 21:04 FredeEB

@yehorb - any further comments on this?

FredeEB avatar Jul 13 '22 11:07 FredeEB

@yehorb - any further comments on this?

Hi. Looks good to me. Thank you for updating the PR.

yehorb avatar Jul 13 '22 16:07 yehorb

@yehorb - Thanks! 👍

FredeEB avatar Jul 13 '22 16:07 FredeEB

@wbthomason - Sorry for pinging you, but I cannot add any reviewers to this PR, but maybe you could give it a read?

FredeEB avatar Oct 10 '22 10:10 FredeEB