summaryrefslogtreecommitdiff
path: root/modules/darwin/vim/default.nix
blob: e0a6898170ca269c8413fe1d2e339e32e24edd32 (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
{
  config,
  lib,
  pkgs,
  ...
}:
with lib; let
  cfg = config.nixfiles.modules.vim;
in {
  config = mkIf cfg.enable {
    programs.vim.package =
      (pkgs.macvim.overrideAttrs (_: _: {
        # Too much of a hassle to selectively override this. Let's just
        # explicitly override everything.
        configureFlags = [
          "--disable-luainterp"
          "--disable-python3interp"
          "--disable-sparkle"
          "--enable-gui=macvim"
          "--with-compiledby=Nix"
          "--with-features=huge"
          "--with-tlib=ncurses"
          "--without-local-dir"
        ];
      }))
      .configure (with cfg; {
        customRC = rc;
        packages.myVimPackage.start = plugins;
      });
  };
}