From 30328c3c3327d41b813cc4fd4f7e4eaaded8bc6e Mon Sep 17 00:00:00 2001 From: ryneeverett Date: Fri, 24 Apr 2020 19:02:31 +0000 Subject: [PATCH] ycmd: typescript completion support Link the already-packaged typescript package so that ycmd will support completions for javascript and typescript filetypes. The structure of these installation directories is "documented" here: . I don't completely understand why the language support is passed as optional attrs Is it because folks want to build leaner packages and pass null or because they want to target particular dependencies? At any rate I followed the pattern. --- pkgs/development/tools/misc/ycmd/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/tools/misc/ycmd/default.nix b/pkgs/development/tools/misc/ycmd/default.nix index aee7af17730..02298d93b8a 100644 --- a/pkgs/development/tools/misc/ycmd/default.nix +++ b/pkgs/development/tools/misc/ycmd/default.nix @@ -2,6 +2,7 @@ , gocode ? null , godef ? null , gotools ? null +, nodePackages ? null , rustracerd ? null , fixDarwinDylibNames, Cocoa ? null }: @@ -69,6 +70,9 @@ stdenv.mkDerivation { TARGET=$out/lib/ycmd/third_party/go/src/golang.org/x/tools/cmd/gopls mkdir -p $TARGET ln -sf ${gotools}/bin/gopls $TARGET + '' + lib.optionalString (nodePackages != null) '' + TARGET=$out/lib/ycmd/third_party/tsserver + ln -sf ${nodePackages.typescript} $TARGET '' + lib.optionalString (rustracerd != null) '' TARGET=$out/lib/ycmd/third_party/racerd/target/release mkdir -p $TARGET