aboutsummaryrefslogtreecommitdiff
path: root/home-manager/homeModules/nvf/default.nix
blob: b3c98cf44dd0a0798872a10694217b7aeeae4676 (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
{ pkgs, lib, config, ... }:

{
  options = {
    nvf.enable = lib.mkEnableOption "enable bspwm";
  };

  config = lib.mkIf config.nvf.enable {
    stylix.targets.nvf.enable = true;
    programs.nvf = {
      enable = true;
      settings.vim = {
        lsp = {
          enable = true;
        };

        autocomplete.blink-cmp = {
          enable = true;
          mappings = {
            next = "M-j";
            previous = "M-k";
            confirm = "M-i";
          };
          setupOpts = {
            completion = {
              menu.auto_show = false;
              ghost_text = {
                enabled = true;
                show_with_menu = false;
              };
            };
          };
        };

        languages = {
          enableTreesitter = true;
          enableFormat = true;

          nix.enable = true;

          ts.enable = true;
          go.enable = true;
          zig.enable = true;
        };
        
        binds.whichKey.enable = true;

        globals.editorconfig = true;
      };

      keymaps = [
        {
          key = "C-\\";
          action = ''vim.opt.keymap = vim.opt.keymap == "russian-juckenwin" and "" or "russian-juckenwin"'';
          lua = true;
        }
      ];
    };
  };
}