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-02 23:36:29 +00:00
|
|
|
esac
|