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:
<https://github.com/ycm-core/ycmd/blob/master/build.py>.

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.
This commit is contained in:
ryneeverett 2020-04-24 19:02:31 +00:00
parent d8b7b590c7
commit 30328c3c33

View File

@ -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