Add .local/bin/update_lsps
This commit is contained in:
parent
b3d304bbbb
commit
a3e2a3555f
1 changed files with 32 additions and 0 deletions
32
private_dot_local/bin/executable_update_lsps
Normal file
32
private_dot_local/bin/executable_update_lsps
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
echo "Installing/updating LSPS."
|
||||
echo
|
||||
|
||||
declare -A LSPS=(
|
||||
["astro"]="sudo npm i -g @astrojs/language-server"
|
||||
["bash"]="sudo npm i -g bash-language-server"
|
||||
["css,html,json"]="sudo npm i -g vscode-langservers-extracted"
|
||||
["markdown"]="yay -S marksman-bin"
|
||||
["rust"]="rustup component add rust-analyzer"
|
||||
["tailwindcss"]="sudo npm i -g @tailwindcss/language-server"
|
||||
["toml"]="cargo install taplo-cli --locked --features lsp"
|
||||
["typescript"]="sudo npm install -g typescript typescript-language-server"
|
||||
["yaml"]="sudo npm i -g yaml-language-server@next"
|
||||
)
|
||||
|
||||
for lsp in "${!LSPS[@]}"; do
|
||||
echo -n "install/update ${lsp}? (y/n): "
|
||||
read -r ans
|
||||
if [[ "$ans" =~ ^[Yy]$ ]]; then
|
||||
echo "-> updating ${lsp}..."
|
||||
eval "${LSPS[$lsp]}"
|
||||
echo "-> ${lsp} done"
|
||||
else
|
||||
echo "-> skipping ${lsp}"
|
||||
fi
|
||||
echo
|
||||
done
|
||||
|
||||
echo "done"
|
||||
Loading…
Add table
Add a link
Reference in a new issue