git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit30328c3c3327d41b813cc4fd4f7e4eaaded8bc6e authorryneeverett <ryneeverett@gmail.com> dateFri 24 Apr 2020, 19:02 (7 years ago) parentd8b7b59
1 file changed+4
pkgs/development/tools/misc/ycmd/default.nix+4
pkgs/development/tools/misc/ycmd/default.nix+4
@@ -2,6 +2,7 @@
22, gocode ? null
33, godef ? null
44, gotools ? null
5+, nodePackages ? null
56, rustracerd ? null
67, fixDarwinDylibNames, Cocoa ? null
78}:
@@ -69,6 +70,9 @@ stdenv.mkDerivation {
6970 TARGET=$out/lib/ycmd/third_party/go/src/golang.org/x/tools/cmd/gopls
7071 mkdir -p $TARGET
7172 ln -sf ${gotools}/bin/gopls $TARGET
73+ '' + lib.optionalString (nodePackages != null) ''
74+ TARGET=$out/lib/ycmd/third_party/tsserver
75+ ln -sf ${nodePackages.typescript} $TARGET
7276 '' + lib.optionalString (rustracerd != null) ''
7377 TARGET=$out/lib/ycmd/third_party/racerd/target/release
7478 mkdir -p $TARGET