2021-10-02 23:36:29 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
SERVER=$1
|
|
|
|
VERSION=$2
|
|
|
|
|
|
|
|
UNAME=$(sh -c 'uname 2>/dev/null || echo Unknown')
|
|
|
|
if [[ "$UNAME" == "Windows_NT" ]]; then
|
|
|
|
UNAME="Windows"
|
|
|
|
fi
|
|
|
|
|
|
|
|
case $SERVER in
|
|
|
|
jdtls)
|
|
|
|
if [ -z "$VERSION" ]; then
|
|
|
|
VERSION="1.4.0"
|
|
|
|
fi
|
|
|
|
FILE_NAME=$(curl https://download.eclipse.org/jdtls/milestones/$VERSION/latest.txt)
|
|
|
|
wget -O - https://download.eclipse.org/jdtls/milestones/$VERSION/$FILE_NAME > /tmp/jdtls.tar.gz
|
|
|
|
mkdir -p $HOME/lsp/java/jdtls
|
|
|
|
tar -xf /tmp/jdtls.tar.gz -C $HOME/lsp/java/jdtls
|
|
|
|
;;
|
|
|
|
omnisharp)
|
|
|
|
if [ -z "$VERSION" ]; then
|
|
|
|
VERSION="v1.37.16"
|
|
|
|
fi
|
|
|
|
case $UNAME in
|
|
|
|
Linux)
|
|
|
|
FILE_NAME="omnisharp-linux-x64.tar.gz"
|
|
|
|
;;
|
|
|
|
Darwin)
|
|
|
|
FILE_NAME="omnisharp-osx.tar.gz"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
wget -O - https://github.com/OmniSharp/omnisharp-roslyn/releases/download/$VERSION/$FILE_NAME > /tmp/omnisharp.tar.gz
|
|
|
|
mkdir -p $HOME/lsp/dotnet/omnisharp
|
|
|
|
tar -xf /tmp/omnisharp.tar.gz -C $HOME/lsp/dotnet/omnisharp
|
|
|
|
;;
|
2021-10-16 15:49:21 +00:00
|
|
|
hls)
|
|
|
|
if [ -z "$VERSION" ]; then
|
|
|
|
VERSION="1.4.0"
|
|
|
|
fi
|
|
|
|
case $UNAME in
|
|
|
|
Linux)
|
|
|
|
FILE_NAME="haskell-language-server-Linux-${VERSION}.tar.gz"
|
|
|
|
;;
|
|
|
|
Darwin)
|
|
|
|
FILE_NAME="haskell-language-server-macOS-${VERSION}.tar.gz"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
wget -O - https://github.com/haskell/haskell-language-server/releases/download/$VERSION/$FILE_NAME > /tmp/hls.tar.gz
|
|
|
|
mkdir -p $HOME/lsp/haskell/hls
|
|
|
|
tar -xf /tmp/hls.tar.gz -C $HOME/lsp/haskell/hls
|
2021-10-18 07:26:17 +00:00
|
|
|
chmod +x $HOME/lsp/haskell/hls/*
|
2021-10-16 15:49:21 +00:00
|
|
|
;;
|
2021-10-19 08:03:52 +00:00
|
|
|
solang)
|
|
|
|
if [ -z "$VERSION" ]; then
|
|
|
|
VERSION="v0.1.8"
|
|
|
|
fi
|
|
|
|
case $UNAME in
|
|
|
|
Linux)
|
|
|
|
FILE_NAME="solang-linux"
|
|
|
|
;;
|
|
|
|
Windows)
|
|
|
|
FILE_NAME="solang.exe"
|
|
|
|
;;
|
|
|
|
Darwin)
|
|
|
|
FILE_NAME="solang-mac-intel"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
mkdir -p $HOME/lsp/solidity/solang
|
|
|
|
wget -O - https://github.com/hyperledger-labs/solang/releases/download/$VERSION/$FILE_NAME > $HOME/lsp/solidity/solang/solang
|
|
|
|
chmod +x $HOME/lsp/solidity/solang/solang
|
|
|
|
;;
|
2021-10-19 10:57:22 +00:00
|
|
|
lemminx)
|
|
|
|
if [ -z "$VERSION" ]; then
|
|
|
|
VERSION="0.18.0-400"
|
|
|
|
fi
|
|
|
|
case $UNAME in
|
|
|
|
Linux)
|
|
|
|
FILE_NAME="lemminx-linux.zip"
|
|
|
|
;;
|
|
|
|
Windows)
|
|
|
|
FILE_NAME="lemminx-win32.zip"
|
|
|
|
;;
|
|
|
|
Darwin)
|
|
|
|
FILE_NAME="lemminx-osx-x86_64.zip"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
mkdir -p $HOME/lsp/xml/lemminx
|
|
|
|
|
|
|
|
wget -O - https://download.jboss.org/jbosstools/vscode/stable/lemminx-binary/$VERSION/$FILE_NAME > /tmp/lemminx-download.zip
|
|
|
|
unzip -p /tmp/lemminx-download.zip > $HOME/lsp/xml/lemminx/lemminx
|
|
|
|
chmod +x $HOME/lsp/xml/lemminx/lemminx
|
|
|
|
;;
|
2021-10-02 23:36:29 +00:00
|
|
|
esac
|