#!/usr/bin/env bash GREEN='\033[0;32m' RED='\033[0;31m' CLEAR='\033[0m' declare -A lsp_arr=( ["pylsp"]="Install the pylsp provider: python-language-server or pylsp" ["pylint"]="Install the pylint provider: pylint" ["rust-analyzer"]="Install the rust-analyzer provider" ["yaml-language-server"]="Install the yamlls provider: yaml-language-server (via npm globally or system package)" ) echo '----- Checking for LSP servers...' for lsp in "${!lsp_arr[@]}"; do echo echo "Checking for $lsp..." which $lsp >/dev/null 2>&1 if [[ $? -eq 1 ]]; then echo -e "${RED} ${lsp_arr[$lsp]} ${CLEAR}" else echo -e "${GREEN} Found $lsp ${CLEAR}" fi done echo