diff --git a/config/plugins/editor/comment.nix b/config/plugins/editor/comment.nix index a682347..2e8056f 100644 --- a/config/plugins/editor/comment.nix +++ b/config/plugins/editor/comment.nix @@ -1,30 +1,39 @@ {...}: { plugins.comment = { enable = true; + settings = { - # LHS of toggle mappings in NORMAL mode toggler = { - # Line-comment toggle keymap - line = "c"; - # Block-comment toggle keymap - block = "c"; + line = "cl"; + block = "cb"; }; - # LHS of operator-pending mappings in NORMAL and VISUAL mode + opleader = { - # Line-comment keymap - line = "c"; - # Block-comment keymap - block = "c"; + line = "cl"; + block = "cb"; }; - # LHS of extra mappings + extra = { - # Add comment on the line above - above = "co"; - # Add comment on the line below - below = "ce"; - # Add comment at the end of line - eol = "ca"; + above = "c"; + below = "c"; + eol = "c"; + }; + + mappings = { + basic = true; + extra = true; }; }; }; + + keymaps = [ + { # prefix: comment + mode = ["n" "v"]; + key = "c"; + action = ""; + options = { + desc = "+comment"; + }; + } + ]; } diff --git a/config/plugins/ui/whichkey.nix b/config/plugins/ui/whichkey.nix index 27c4f9e..480ffb7 100644 --- a/config/plugins/ui/whichkey.nix +++ b/config/plugins/ui/whichkey.nix @@ -17,15 +17,6 @@ }; } - { - mode = ["n" "v"]; - key = "c"; - action = ""; - options = { - desc = "+comment"; - }; - } - { mode = "n"; key = "g";