diff --git a/modules/neovim/init/autocmds.nix b/modules/neovim/init/autocmds.nix index 5da7bc55..e74dd620 100644 --- a/modules/neovim/init/autocmds.nix +++ b/modules/neovim/init/autocmds.nix @@ -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.