init/autocmds: add example to the autocmds option
Some checks failed
Check for typos in the source tree / check-typos (push) Has been cancelled

This commit is contained in:
raf 2025-03-16 00:53:49 +03:00
parent 15fbd146aa
commit 7b58caaa9f
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF

View file

@ -126,6 +126,20 @@ in {
autocmds = mkOption {
type = listOf autocommandType;
default = [];
example = literalExpression ''
[
{
enable = true;
desc = "Highlight yanks on copy";
pattern = ["*"];
callback = lib.generators.mkLuaInline '''
function()
vim.highlight.on_yank({ timeout = 500 })
end
''';
}
]
'';
description = ''
A list of Neovim autocommands to be registered.