From 3e06e909b1bc6f4d5435695081bc4e336616fa29 Mon Sep 17 00:00:00 2001 From: Mitsuo Heijo Date: Tue, 24 Dec 2019 00:35:57 +0900 Subject: pyls_ms --- installer/install-pyls_ms.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 installer/install-pyls_ms.sh 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 <pyls_ms +#!/bin/sh + +DIR=\$(cd \$(dirname \$0); pwd) +\$DIR/.dotnet/dotnet exec \$DIR/Microsoft.Python.LanguageServer.dll +EOF + +chmod +x pyls_ms -- cgit v1.2.3-54-g00ecf