about summary refs log tree commit diff stats
path: root/modules/home/conf/nvim/default.nix
blob: 2da80c2266f37e93941eebdbafdc98343dc943aa (plain) (blame)
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
{pkgs, ...}: {
  imports = [
    ./autocmds
    ./clipboard
    ./files
    ./mappings
    ./options
    ./plgs
  ];
  home.sessionVariables = {
    EDITOR = "nvim";
    VISUAL = "nvim";
    CODEEDITOR = "nvim";
  };
  programs.nixvim = {
    enable = true;

    # source: https://www.patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=Neovim
    extraConfigLuaPre =
      /*
       FIXME: Update the merge function to support that: <2023-08-29>

      lib.mkBefore
      */
      ''
        ---------------------------------------------------------------------------
        --
        --     ███╗   ██╗███████╗ ██████╗ ██╗   ██╗██╗███╗   ███╗
        --     ████╗  ██║██╔════╝██╔═══██╗██║   ██║██║████╗ ████║
        --     ██╔██╗ ██║█████╗  ██║   ██║██║   ██║██║██╔████╔██║
        --     ██║╚██╗██║██╔══╝  ██║   ██║╚██╗ ██╔╝██║██║╚██╔╝██║
        --     ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║
        --     ╚═╝  ╚═══╝╚══════╝ ╚═════╝   ╚═══╝  ╚═╝╚═╝     ╚═╝
        --
        ---------------------------------------------------------------------------
      '';

    extraPackages = with pkgs; [
      /*
      These are mostly linters and formatters used for different file types.
      Including them here is fine, as they are not necessarily sync able to different people.
      */
      # nix
      alejandra
      statix

      # yaml
      yamllint

      # shell
      shellcheck
      shfmt
    ];
  };
}