about summary refs log tree commit diff stats
path: root/hm/soispha/conf/nvim/plgs/comment-nvim/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hm/soispha/conf/nvim/plgs/comment-nvim/default.nix')
-rw-r--r--hm/soispha/conf/nvim/plgs/comment-nvim/default.nix48
1 files changed, 26 insertions, 22 deletions
diff --git a/hm/soispha/conf/nvim/plgs/comment-nvim/default.nix b/hm/soispha/conf/nvim/plgs/comment-nvim/default.nix
index cf99d3d5..b0d405f3 100644
--- a/hm/soispha/conf/nvim/plgs/comment-nvim/default.nix
+++ b/hm/soispha/conf/nvim/plgs/comment-nvim/default.nix
@@ -10,27 +10,31 @@
         extra = false;
       };
     };
-    maps = {
-      visual = {
-        "gcc" = {
-          action = "<Plug>(comment_toggle_linewise_visual)";
-          desc = "toggle the current line in a linewise comment";
-        };
-        "gbc" = {
-          action = "<Plug>(comment_toggle_blockwise_visual)";
-          desc = "toggle the current line in a blockwise comment";
-        };
-      };
-      normal = {
-        "gcc" = {
-          action = "<Plug>(comment_toggle_linewise_current)";
-          desc = "toggle the current line in a linewise comment";
-        };
-        "gbc" = {
-          action = "<Plug>(comment_toggle_blockwise_current)";
-          desc = "toggle the current line in a blockwise comment";
-        };
-      };
-    };
+    keymaps = [
+      {
+        key = "gcc";
+        mode = "v";
+        action = "<Plug>(comment_toggle_linewise_visual)";
+        options.desc = "toggle the current line in a linewise comment";
+      }
+      {
+        key = "gbc";
+        mode = "v";
+        action = "<Plug>(comment_toggle_blockwise_visual)";
+        options.desc = "toggle the current line in a blockwise comment";
+      }
+      {
+        key = "gcc";
+        mode = "n";
+        action = "<Plug>(comment_toggle_linewise_current)";
+        options.desc = "toggle the current line in a linewise comment";
+      }
+      {
+        key = "gbc";
+        mode = "n";
+        action = "<Plug>(comment_toggle_blockwise_current)";
+        options.desc = "toggle the current line in a blockwise comment";
+      }
+    ];
   };
 }