From a3e2a3555ffaf513c90f72f3983e8cf3a4d21f6b Mon Sep 17 00:00:00 2001 From: lew Date: Sat, 1 Nov 2025 03:51:15 +0000 Subject: [PATCH] Add .local/bin/update_lsps --- private_dot_local/bin/executable_update_lsps | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 private_dot_local/bin/executable_update_lsps diff --git a/private_dot_local/bin/executable_update_lsps b/private_dot_local/bin/executable_update_lsps new file mode 100644 index 0000000..eb7b443 --- /dev/null +++ b/private_dot_local/bin/executable_update_lsps @@ -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"