Files
vim-lsp-settings-mirror/installer/install-starpls.sh
Mark Korondi ac7a1dc60b Add starpls server (Starlark LSP)
"starpls is a language server for Starlark, the configuration language
used by Bazel and Buck2." [1]

[1]: https://github.com/withered-magic/starpls
2024-08-21 10:30:15 +09:00

42 lines
719 B
Bash
Executable File

#!/bin/sh
set -e
os=$(uname -s | tr "[:upper:]" "[:lower:]")
arch="$(uname -m)"
case $os in
linux)
if [ "$arch" = "x86_64" ]; then
platform="linux-amd64"
else
echo "unknown architecture: $arch"
exit 1
fi
;;
darwin)
if [ "$arch" = "aarch64" ] || [ "$arch" = "arm64" ]; then
platform="darwin-arm64"
else
echo "unknown architecture: $arch"
exit 1
fi
;;
mingw64_nt*)
if [ "$arch" = "x86_64" ]; then
platform="windows-amd64.exe"
else
echo "unknown architecture: $arch"
exit 1
fi
;;
*)
echo "unknow platform: $os"
exit 1
;;
esac
curl -L -o "starpls" "https://github.com/withered-magic/starpls/releases/latest/download/starpls-$platform"
chmod +x starpls