aboutsummaryrefslogtreecommitdiffstats
path: root/modules/development/nixvim/plugins/comment.nix
blob: a14bd10f00001ffa5c698e41a7ec01a6cc797c60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ config, lib, ... }:

# Comment - Comment toggling plugin (comment.nvim)
{
  config.programs.nixvim.plugins.comment = lib.mkIf config.development.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
      };
    };
  };
}