about summary refs log tree commit diff
path: root/pkgs/development/tools/misc
diff options
context:
space:
mode:
authorryneeverett <ryneeverett@gmail.com>2020-04-24 19:02:31 +0000
committerryneeverett <ryneeverett@gmail.com>2020-04-24 19:02:31 +0000
commit30328c3c3327d41b813cc4fd4f7e4eaaded8bc6e (patch)
treed4c66664d0f35b1fd0109ba0cc3497cfd1d8eea7 /pkgs/development/tools/misc
parentd8b7b590c7b1166fad48935d757c3ff10375c89a (diff)
downloadnixlib-30328c3c3327d41b813cc4fd4f7e4eaaded8bc6e.tar
nixlib-30328c3c3327d41b813cc4fd4f7e4eaaded8bc6e.tar.gz
nixlib-30328c3c3327d41b813cc4fd4f7e4eaaded8bc6e.tar.bz2
nixlib-30328c3c3327d41b813cc4fd4f7e4eaaded8bc6e.tar.lz
nixlib-30328c3c3327d41b813cc4fd4f7e4eaaded8bc6e.tar.xz
nixlib-30328c3c3327d41b813cc4fd4f7e4eaaded8bc6e.tar.zst
nixlib-30328c3c3327d41b813cc4fd4f7e4eaaded8bc6e.zip
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.
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r--pkgs/development/tools/misc/ycmd/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/ycmd/default.nix b/pkgs/development/tools/misc/ycmd/default.nix
index aee7af177305..02298d93b8af 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