mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-04-15 00:58:37 +00:00
init/autocmds: add example to the autocmds option
Some checks failed
Check for typos in the source tree / check-typos (push) Has been cancelled
Some checks failed
Check for typos in the source tree / check-typos (push) Has been cancelled
This commit is contained in:
parent
15fbd146aa
commit
7b58caaa9f
1 changed files with 14 additions and 0 deletions
|
@ -126,6 +126,20 @@ in {
|
||||||
autocmds = mkOption {
|
autocmds = mkOption {
|
||||||
type = listOf autocommandType;
|
type = listOf autocommandType;
|
||||||
default = [];
|
default = [];
|
||||||
|
example = literalExpression ''
|
||||||
|
[
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
desc = "Highlight yanks on copy";
|
||||||
|
pattern = ["*"];
|
||||||
|
callback = lib.generators.mkLuaInline '''
|
||||||
|
function()
|
||||||
|
vim.highlight.on_yank({ timeout = 500 })
|
||||||
|
end
|
||||||
|
''';
|
||||||
|
}
|
||||||
|
]
|
||||||
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
A list of Neovim autocommands to be registered.
|
A list of Neovim autocommands to be registered.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue