Skip to content

Added note about nvim 0.7.0 lua autocmds - #895

Open
FredeHoey wants to merge 2 commits into
wbthomason:masterfrom
FredeHoey:update-readme
Open

Added note about nvim 0.7.0 lua autocmds#895
FredeHoey wants to merge 2 commits into
wbthomason:masterfrom
FredeHoey:update-readme

Conversation

@FredeHoey

Copy link
Copy Markdown

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

@yehorb

yehorb commented Apr 29, 2022

Copy link
Copy Markdown

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.

@FredeHoey

Copy link
Copy Markdown
Author

@yehorb - TIL! Thanks. I updated the PR

@FredeHoey

Copy link
Copy Markdown
Author

@yehorb - any further comments on this?

@yehorb

yehorb commented Jul 13, 2022

Copy link
Copy Markdown

@yehorb - any further comments on this?

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

@FredeHoey

Copy link
Copy Markdown
Author

@yehorb - Thanks! 👍

@FredeHoey

Copy link
Copy Markdown
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants