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