about summary refs log tree commit diff stats
path: root/home-manager/soispha/config/neovim/nixvim
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-08-26 22:23:20 +0200
committerSoispha <soispha@vhack.eu>2023-08-26 22:56:05 +0200
commit916f6fc2922f415f93df6f711dab8c03695966dc (patch)
tree7bd722ee95d4b6cf4928fca066d3c072f51890e6 /home-manager/soispha/config/neovim/nixvim
parentFix(flake): Expose home-manager config to nvim config (diff)
downloadnixos-config-916f6fc2922f415f93df6f711dab8c03695966dc.zip
Feat(hm/conf/neovim/autocmds): Highlight yanked text
Diffstat (limited to 'home-manager/soispha/config/neovim/nixvim')
-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 = ''