diff options
author | mattn <mattn.jp@gmail.com> | 2020-01-29 23:25:06 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-29 23:25:06 +0900 |
commit | 085fc82ade226146a15acd2145453093d8373051 (patch) | |
tree | a8c1457c8323dfc729a480a093b230a065bdd859 | |
parent | 36cdf612ceae5c226215b03eefdf7ab57edddb23 (diff) | |
parent | f2a50e1d90e32eb4f7f9ec52edd23fc598b4c8ec (diff) | |
download | vim-lsp-settings-085fc82ade226146a15acd2145453093d8373051.tar.gz vim-lsp-settings-085fc82ade226146a15acd2145453093d8373051.tar.bz2 vim-lsp-settings-085fc82ade226146a15acd2145453093d8373051.zip |
Merge pull request #111 from mattn/pyls-ms-installer
installer for pyls-ms
-rwxr-xr-x | installer/install-pyls-ms.sh | 34 | ||||
-rw-r--r-- | settings/pyls-ms.vim | 2 |
2 files changed, 35 insertions, 1 deletions
diff --git a/installer/install-pyls-ms.sh b/installer/install-pyls-ms.sh new file mode 100755 index 0000000..f771f31 --- /dev/null +++ b/installer/install-pyls-ms.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +set -e + +# REF https://github.com/neovim/nvim-lsp/blob/master/lua/nvim_lsp/pyls_ms.lua + +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 diff --git a/settings/pyls-ms.vim b/settings/pyls-ms.vim index 6968fc7..437d00e 100644 --- a/settings/pyls-ms.vim +++ b/settings/pyls-ms.vim @@ -10,7 +10,7 @@ augroup vimlsp_settings_pyls_ms \ 'displayOptions': {}, \ 'interpreter': { \ 'properties': { - \ 'InterpreterPath': lsp_settings#get('pyls-ms', 'python-path', {key, name->exepath('python')}, + \ 'InterpreterPath': lsp_settings#get('pyls-ms', 'python-path', {key, name->exepath('python')}), \ 'UseDefaultDatabase': v:true, \ 'Version': lsp_settings#get('pyls-ms', 'python-ver', {key, name->trim(matchstr(system('python -V'), '\s\zs\S\+'))}), \ }, |