aboutsummaryrefslogtreecommitdiffstats
path: root/modules/development/nixvim/plugins/comment.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/development/nixvim/plugins/comment.nix')
-rw-r--r--modules/development/nixvim/plugins/comment.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/development/nixvim/plugins/comment.nix b/modules/development/nixvim/plugins/comment.nix
new file mode 100644
index 0000000..cc1b9cb
--- /dev/null
+++ b/modules/development/nixvim/plugins/comment.nix
@@ -0,0 +1,23 @@
+{ config, lib, ... }:
+
+# Comment - Comment toggling plugin (comment.nvim)
+{
+ config.programs.nixvim.plugins.comment = lib.mkIf config.programs.nixvim.enable {
+ enable = true;
+ settings = {
+ toggler = {
+ line = "gcc"; # toggle line comment
+ block = "gbc"; # toggle block comment
+ };
+ opleader = {
+ line = "gc"; # line comment operator (gc + motion)
+ block = "gb"; # block comment operator (gb + motion)
+ };
+ extra = {
+ above = "gcO"; # add comment line above
+ below = "gco"; # add comment line below
+ eol = "gcA"; # add comment at end of line
+ };
+ };
+ };
+}