about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--home-manager/soispha/config/neovim/nixvim/autocmds/default.nix16
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 = ''