From d7170115f3252404c81551f6183d31d48e0316eb Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Fri, 19 Jun 2026 18:38:36 +0530 Subject: [PATCH] Update installers/install_nvim.sh --- installers/install_nvim.sh | 50 ++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/installers/install_nvim.sh b/installers/install_nvim.sh index c31881e..9dcff08 100644 --- a/installers/install_nvim.sh +++ b/installers/install_nvim.sh @@ -4,6 +4,8 @@ set -euo pipefail NVIM_VERSION="0.11.7" NVIM_URL="https://github.com/neovim/neovim/releases/download/v${NVIM_VERSION}/nvim-linux-x86_64.tar.gz" NVIM_INSTALL_DIR="/opt/nvim" +NVIM_CONFIG_REPO="https://git.adityagupta.dev/sortedcord/editor.git" +NVIM_CONFIG_DIR="$HOME/.config/nvim" TMP_DIR="$(mktemp -d)" @@ -21,6 +23,30 @@ confirm() { [[ "$response" =~ ^[Yy]$ ]] } +check_config_dir() { + if [[ -d "$NVIM_CONFIG_DIR" ]]; then + if confirm "$NVIM_CONFIG_DIR already exists. Replace it?"; then + echo "Existing configuration will be removed during setup." + rm -rf "$NVIM_CONFIG_DIR" + else + while true; do + read -r -p "Enter an alternative directory to clone the configuration into: " alt_dir