diff options
author | Soispha <soispha@vhack.eu> | 2023-08-26 22:23:20 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-08-26 22:56:05 +0200 |
commit | 916f6fc2922f415f93df6f711dab8c03695966dc (patch) | |
tree | 7bd722ee95d4b6cf4928fca066d3c072f51890e6 /home-manager/soispha/config/neovim | |
parent | Fix(flake): Expose home-manager config to nvim config (diff) | |
download | nixos-config-916f6fc2922f415f93df6f711dab8c03695966dc.zip |
Feat(hm/conf/neovim/autocmds): Highlight yanked text
Diffstat (limited to '')
-rw-r--r-- | home-manager/soispha/config/neovim/nixvim/autocmds/default.nix | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/home-manager/soispha/config/neovim/nixvim/autocmds/default.nix b/home-manager/soispha/config/neovim/nixvim/autocmds/default.nix index e7dca8b1..d00bace1 100644 --- a/home-manager/soispha/config/neovim/nixvim/autocmds/default.nix +++ b/home-manager/soispha/config/neovim/nixvim/autocmds/default.nix @@ -1,12 +1,26 @@ -{...}: { +{config, ...}: { programs.nixvim = { autoGroups = { cursor_off = {clear = true;}; numbertoggle = {clear = true;}; coloroverride = {clear = true;}; + highlight_on_yank = {clear = true;}; }; autoCmd = [ { + event = ["TextYankPost"]; + pattern = ["*"]; + callback = { + __raw = '' + function() + vim.highlight.on_yank() + end + ''; + }; + group = "highlight_on_yank"; + description = "Highlight the yanked text"; + } + { event = ["BufWritePre"]; pattern = ["*"]; command = '' |