From 916f6fc2922f415f93df6f711dab8c03695966dc Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 26 Aug 2023 22:23:20 +0200 Subject: Feat(hm/conf/neovim/autocmds): Highlight yanked text --- .../soispha/config/neovim/nixvim/autocmds/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'home-manager/soispha/config/neovim/nixvim/autocmds/default.nix') 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,11 +1,25 @@ -{...}: { +{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 = ["*"]; -- cgit 1.4.1