diff options
| -rw-r--r-- | modules/common.nix | 1 | ||||
| -rw-r--r-- | modules/vim.nix | 5 | ||||
| -rw-r--r-- | pkgs/default.nix | 2 | ||||
| -rw-r--r-- | pkgs/youcompleteme.nix | 32 |
4 files changed, 36 insertions, 4 deletions
diff --git a/modules/common.nix b/modules/common.nix index 209a385..3b3b6ec 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -76,7 +76,6 @@ go gopls delve go-task meson cmake nil nixfmt-rfc-style direnv - ycmd helix wineWowPackages.stagingFull winetricks bottles diff --git a/modules/vim.nix b/modules/vim.nix index 4fe62fe..ceceac5 100644 --- a/modules/vim.nix +++ b/modules/vim.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, auxiliaryPkgs, ... }: let configs = [ @@ -18,13 +18,12 @@ let packages.collection = with vimPlugins; { start = [ - YouCompleteMe fzf-vim vim-easymotion vim-sleuth vim-better-whitespace vim-tmux-navigator - ]; + ] ++ (with auxiliaryPkgs; [ youcompleteme ]); opt = [ ]; }; diff --git a/pkgs/default.nix b/pkgs/default.nix index 9b8c990..ec2599a 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -17,4 +17,6 @@ rec { ngfx = pkgs.callPackage ./ngfx.nix {}; retroarch = pkgs.callPackage ./retroarch.nix {}; + + youcompleteme = pkgs.callPackage ./youcompleteme.nix {}; } diff --git a/pkgs/youcompleteme.nix b/pkgs/youcompleteme.nix new file mode 100644 index 0000000..190e4b5 --- /dev/null +++ b/pkgs/youcompleteme.nix @@ -0,0 +1,32 @@ +{ + ycmd, + vimPlugins, + gopls, + ... +}: + +let + ycmd-go = ycmd.overrideAttrs ( + final: prev: { + pname = prev.pname + "-go"; + + installPhase = + prev.installPhase + + '' + TARGET=$out/lib/ycmd/third_party/go/bin + mkdir -p $TARGET + ln -sf ${gopls}/bin/gopls $TARGET + ''; + } + ); +in +vimPlugins.YouCompleteMe.overrideAttrs ( + final: prev: { + buildPhase = + prev.buildPhase + + '' + rm third_party/ycmd + ln -s ${ycmd-go}/lib/ycmd third_party + ''; + } +) |
