aboutsummaryrefslogtreecommitdiffstats
path: root/modules/development/nixvim/plugins/comment.nix
blob: 8c69218359aaba87afe262b4cb44f7d03f9ff1eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Comment toggling plugin
{ config, lib, ... }:
{
  config.programs.nixvim.plugins.comment = lib.mkIf config.development.nixvim.enable {
    enable = true;
    settings = {
      toggler = {
        line = "<leader>cc"; # toggle line comment
        block = "<leader>cb"; # toggle block comment
      };
      opleader = {
        line = "<leader>cc"; # toggle line comment
        block = "<leader>cb"; # toggle block comment
      };
      extra = {
        above = "<leader>cu"; # add comment line above
        below = "<leader>cd"; # add comment line below
        eol = "<leader>ce"; # add comment at end of line
      };
    };
  };
}