aboutsummaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authorMitsuo Heijo <mitsuo.heijo@gmail.com>2019-12-24 00:35:57 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-29 23:07:32 +0900
commit3e06e909b1bc6f4d5435695081bc4e336616fa29 (patch)
treeee12ebc67944aa11fd64eeabb4484a8dfc0ac5d2 /installer
parent36cdf612ceae5c226215b03eefdf7ab57edddb23 (diff)
downloadvim-lsp-settings-3e06e909b1bc6f4d5435695081bc4e336616fa29.tar.gz
vim-lsp-settings-3e06e909b1bc6f4d5435695081bc4e336616fa29.tar.bz2
vim-lsp-settings-3e06e909b1bc6f4d5435695081bc4e336616fa29.zip
pyls_ms
Diffstat (limited to 'installer')
-rwxr-xr-xinstaller/install-pyls_ms.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/installer/install-pyls_ms.sh b/installer/install-pyls_ms.sh
new file mode 100755
index 0000000..1efb8a3
--- /dev/null
+++ b/installer/install-pyls_ms.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+set -e
+
+# REF https://github.com/neovim/nvim-lsp/blob/master/lua/nvim_lsp/pyls_ms.lua
+
+server_dir="../servers/pyls_ms"
+
+cd $(dirname $0)
+[ -d $server_dir ] && rm -rf $server_dir
+mkdir $server_dir && cd $server_dir
+
+curl -L https://dot.net/v1/dotnet-install.sh | bash -s -- -i "./.dotnet"
+
+os=$(uname -s | tr "[:upper:]" "[:lower:]")
+case $os in
+linux)
+ system="linux"
+ ;;
+darwin)
+ system="osx"
+ ;;
+*) ;;
+esac
+
+version="0.5.10"
+url="https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-${system}-x64.${version}.nupkg"
+
+nupkg="./pyls.nupkg"
+curl -L "$url" -o "$nupkg"
+unzip "$nupkg"
+
+cat <<EOF >pyls_ms
+#!/bin/sh
+
+DIR=\$(cd \$(dirname \$0); pwd)
+\$DIR/.dotnet/dotnet exec \$DIR/Microsoft.Python.LanguageServer.dll
+EOF
+
+chmod +x pyls_ms