aboutsummaryrefslogtreecommitdiff
path: root/modules/lazygit.nix
blob: d5196e012205641be6a565f1fdca9c6989395ab0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.modules.lazygit;
  scheme = config.modules.scheme;
in
{
  options.modules.lazygit = {
    enable = lib.mkEnableOption "lazygit";
  };

  config = lib.mkIf cfg.enable {
    programs.lazygit = {
      enable = true;
      settings = {
        keybinding = {
          universal = {
            "prevItem-alt" = "e";
            "nextItem-alt" = "n";
            "prevBlock-alt" = "m";
            "nextBlock-alt" = "i";
            "scollUpMain-alt1" = "E";
            "scollDownMain-alt1" = "N";
            nextMatch = "j";
            prevMatch = "J";
            new = "j";
            edit = "k";
            createRebaseOptionsMenu = "h";
          };
          files = {
            ignoreFile = "l";
          };
          branches = {
            viewGitFlowOptions = "l";
          };
          commits = {
            startInteractiveRebase = "u";
          };
        };
        gui = {
          notARepository = "skip";
          mouseEvents = false;
          showRandomTip = false;
          border = "single";
          theme = {
            activeBorderColor = [
              scheme.base0D
              "bold"
            ];
            inactiveBorderColor = [ scheme.base03 ];
            searchingActiveBorderColor = [ scheme.base09 ];
            optionsTextColor = [ scheme.base0D ];
            selectedLineBgColor = [ scheme.base02 ];
            cherryPickedCommitBgColor = [ scheme.base03 ];
            cherryPickedCommitFgColor = [ scheme.base0D ];
            markedBaseCommitFgColor = [ scheme.base0D ];
            unstagedChangesColor = [ scheme.base0F ];
            defaultFgColor = [ scheme.base05 ];
          };
          git = {
            paging.useConfig = true;
            parseEmoji = true;
          };
        };
      };
    };
  };
}