aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2019-12-25 16:16:24 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2019-12-25 16:16:24 +0900
commit1bd8222f25a07bf48d12c020e553f0a2dd616aae (patch)
tree9b3d9ccd600482f73366399326f202a273815aab
parenta7c843b879f937007c9c20751e8258e31c050cad (diff)
downloadvim-lsp-settings-1bd8222f25a07bf48d12c020e553f0a2dd616aae.tar.gz
vim-lsp-settings-1bd8222f25a07bf48d12c020e553f0a2dd616aae.tar.bz2
vim-lsp-settings-1bd8222f25a07bf48d12c020e553f0a2dd616aae.zip
Add missing installers for Windows
-rw-r--r--installer/install-bash-language-server.cmd14
-rw-r--r--installer/install-css-languageserver.cmd5
-rw-r--r--installer/install-docker-langserver.cmd13
-rw-r--r--installer/install-html-languageserver.cmd5
-rw-r--r--installer/install-javascript-typescript-langserver.cmd14
-rw-r--r--installer/install-metals.cmd16
-rw-r--r--installer/install-typescript-language-server.cmd13
-rw-r--r--installer/install-vim-language-server.cmd13
-rw-r--r--installer/install-yaml-language-server.cmd5
-rw-r--r--installer/npm_install.cmd21
10 files changed, 57 insertions, 62 deletions
diff --git a/installer/install-bash-language-server.cmd b/installer/install-bash-language-server.cmd
index 470b32a..1976dc4 100644
--- a/installer/install-bash-language-server.cmd
+++ b/installer/install-bash-language-server.cmd
@@ -1,17 +1,5 @@
@echo off
cd %~dp0
-if exist "..\servers\bash-language-server" rd /S /Q "..\servers\bash-language-server"
-md "..\servers\bash-language-server"
-cd "..\servers\bash-language-server"
-git clone https://github.com/mads-hartmann/bash-language-server .
-
-call yarn
-call yarn run compile:server
-
-echo @echo off ^
-
-node %%~dp0\server\bin\main.js start ^
-
-> bash-language-server.cmd
+call npm_install bash-language-server bash-language-server
diff --git a/installer/install-css-languageserver.cmd b/installer/install-css-languageserver.cmd
new file mode 100644
index 0000000..79de653
--- /dev/null
+++ b/installer/install-css-languageserver.cmd
@@ -0,0 +1,5 @@
+@echo off
+
+cd %~dp0
+
+call npm_install css-languageserver vscode-css-languageserver-bin
diff --git a/installer/install-docker-langserver.cmd b/installer/install-docker-langserver.cmd
index f712d68..fd16f67 100644
--- a/installer/install-docker-langserver.cmd
+++ b/installer/install-docker-langserver.cmd
@@ -1,17 +1,6 @@
@echo off
cd %~dp0
-if exist "..\servers\docker-langserver" rd /S /Q "..\servers\docker-langserver"
-md "..\servers\docker-langserver"
-cd "..\servers\docker-langserver"
-git clone https://github.com/rcjsuen/dockerfile-language-server-nodejs .
-call npm install
-call npm run build
-
-echo @echo off ^
-
-node %%~dp0\bin\docker-langserver --stdio ^
-
-> docker-langserver.cmd
+call npm_install docker-langserver dockerfile-language-server-nodejs
diff --git a/installer/install-html-languageserver.cmd b/installer/install-html-languageserver.cmd
new file mode 100644
index 0000000..90ac626
--- /dev/null
+++ b/installer/install-html-languageserver.cmd
@@ -0,0 +1,5 @@
+@echo off
+
+cd %~dp0
+
+call npm_install html-languageserver vscode-html-languageserver-bin
diff --git a/installer/install-javascript-typescript-langserver.cmd b/installer/install-javascript-typescript-langserver.cmd
index 5fc5a5c..3ddc2da 100644
--- a/installer/install-javascript-typescript-langserver.cmd
+++ b/installer/install-javascript-typescript-langserver.cmd
@@ -1,17 +1,5 @@
@echo off
cd %~dp0
-if exist "..\servers\javascript-typescript-langserver" rd /S /Q "..\servers\javascript-typescript-langserver"
-md "..\servers\javascript-typescript-langserver"
-cd "..\servers\javascript-typescript-langserver"
-git clone https://github.com/sourcegraph/javascript-typescript-langserver .
-
-call npm install
-call npm build
-
-echo @echo off ^
-
-node %%~dp0\lib\language-server-stdio.js ^
-
-> javascript-typescript-langserver.cmd
+call npm_install javascript-typescript-langserver javascript-typescript-langserver
diff --git a/installer/install-metals.cmd b/installer/install-metals.cmd
new file mode 100644
index 0000000..8d290cf
--- /dev/null
+++ b/installer/install-metals.cmd
@@ -0,0 +1,16 @@
+@echo off
+
+setlocal
+
+cd %~dp0
+
+set server_dir="..\servers\metals"
+rd /Q /S %server_dir%
+md %server_dir%
+cd "%server_dir%"
+
+curl -Lo coursier https://git.io/coursier-cli
+curl -Lo coursier.bat https://git.io/coursier-bat
+
+set version="0.7.6"
+java %JAVA_OPTS% -jar coursier bootstrap --ttl Inf "org.scalameta:metals_2.12:%version%" -r "bintray:scalacenter/releases" -r "sonatype:public" -r "sonatype:snapshots" -o metals
diff --git a/installer/install-typescript-language-server.cmd b/installer/install-typescript-language-server.cmd
index d5d8c21..fea8393 100644
--- a/installer/install-typescript-language-server.cmd
+++ b/installer/install-typescript-language-server.cmd
@@ -1,16 +1,5 @@
@echo off
cd %~dp0
-if exist "..\servers\typescript-language-server" rd /S /Q "..\servers\typescript-language-server"
-md "..\servers\typescript-language-server"
-cd "..\servers\typescript-language-server"
-git clone https://github.com/theia-ide/typescript-language-server .
-
-call yarn
-
-echo @echo off ^
-
-node %%~dp0\server\lib\cli.js --stdio ^
-
-> typescript-language-server.cmd
+call npm_install typescript-language-server typescript-language-server
diff --git a/installer/install-vim-language-server.cmd b/installer/install-vim-language-server.cmd
index 4a7bd9e..14ad1bc 100644
--- a/installer/install-vim-language-server.cmd
+++ b/installer/install-vim-language-server.cmd
@@ -1,16 +1,5 @@
@echo off
cd %~dp0
-if exist "..\servers\vim-language-server" rd /S /Q "..\servers\vim-language-server"
-md "..\servers\vim-language-server"
-cd "..\servers\vim-language-server"
-git clone https://github.com/iamcco/vim-language-server .
-
-call yarn
-
-echo @echo off ^
-
-node %%~dp0\bin\index.js --stdio ^
-
-> vim-language-server.cmd
+call npm_install vim-language-server vim-language-server
diff --git a/installer/install-yaml-language-server.cmd b/installer/install-yaml-language-server.cmd
new file mode 100644
index 0000000..6d404c6
--- /dev/null
+++ b/installer/install-yaml-language-server.cmd
@@ -0,0 +1,5 @@
+@echo off
+
+cd %~dp0
+
+call npm_install yaml-language-server yaml-language-server
diff --git a/installer/npm_install.cmd b/installer/npm_install.cmd
new file mode 100644
index 0000000..d17c974
--- /dev/null
+++ b/installer/npm_install.cmd
@@ -0,0 +1,21 @@
+@echo off
+
+if "x%1" equ "x" goto :EOF
+if "x%2" equ "x" goto :EOF
+
+set server_dir="..\servers\%1"
+rd /Q /S "%server_dir%" 2>NUL
+md "%server_dir%"
+cd "%server_dir%"
+
+call npm init -y
+
+echo {"name":""}>package.json
+
+call npm install "%2"
+
+echo @echo off ^
+
+call %%~dp0\node_modules\.bin\%1.cmd %%* ^
+
+> %1.cmd