aboutsummaryrefslogtreecommitdiff
path: root/modules/home/tools/neovim/default.nix
blob: 0cac0c25d785497738d7b68de37bd03dc7829615 (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
{ options, config, lib, pkgs, namespace, ... }:

with lib; with lib.${namespace}; let
  cfg = config.${namespace}.tools.neovim;
  theme = config.${namespace}.desktop.theme;
in {
  options.${namespace}.tools.neovim = with types; {
    enable = mkEnableOption "neovim";
  };

  config = mkIf cfg.enable {
    programs.nixvim = {
      enable = true;

      colorschemes."${theme.vim}".enable = true;

      opts = {
        number = true;
        relativenumber = true;
      };

      extraConfigVim = ''
        highlight Normal guibg=NONE
      '';

      plugins.lsp = {
        enable = true;

        servers = {
          zls.enable = true;
          asm_lsp.enable = true;
        };
      };

      plugins.nix.enable = true;
      plugins.trouble.enable = true;
    };
  };
}