From e2fd9a75fbed6685db3d59cd3c9e999a00d49c65 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Sun, 11 Aug 2024 16:18:38 -0600 Subject: [PATCH] Install: update post install for lsp --- post_install.sh | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/post_install.sh b/post_install.sh index 06f0162..f384251 100755 --- a/post_install.sh +++ b/post_install.sh @@ -438,7 +438,6 @@ check_sshdconfig() { # Docker configs #################### docker_checks() { - check_for_docker_service check_for_docker_detach_keys } @@ -538,6 +537,29 @@ russy_build() { fi } +#################### +# Vim +#################### +vim_checks() { + check_for_tsserver +} + +check_for_tsserver() { + local return_code=0 + + if ! command -v tsserver &>/dev/null; then + printf 'ERR: tsserver vim lsp not found!\n' + printf '\tInstall using `npm install --user typescript typescript-language-server vscode-langservers-extracted flow-bin`\n' + return_code=1 + fi + + return $return_code +} + + +#################### +# Main +#################### if [[ "$1" == 'build' ]]; then russy_build || exit 1 fi @@ -557,6 +579,7 @@ if [[ "$(uname -s)" == 'Linux' ]] && [[ "$1" == 'status' || "$1" == 'build' ]]; ssh_checks docker_checks russy_checks + vim_checks else print_help fi