From 6666dda6d1436d7897b3da75f4a326263ddbb5e7 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 27 Oct 2024 17:29:57 +0100 Subject: [PATCH] restructure --- .../Developer-tools/neovim-setup.sh | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/core/tabs/applications-setup/Developer-tools/neovim-setup.sh b/core/tabs/applications-setup/Developer-tools/neovim-setup.sh index 576fc17f5..954f962bb 100755 --- a/core/tabs/applications-setup/Developer-tools/neovim-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/neovim-setup.sh @@ -51,23 +51,27 @@ linkNeovimConfig() { ln -s "$gitpath/titus-kickstart/"* "$HOME/.config/nvim/" # Wild card is used here to link all contents of titus-kickstart. } +askToClone() { + printf "%b\n" "${GREEN}Do you also want to install the TitusDotfiles for neovim? (Y/n): ${RC}" + read -r _titusDots + case "$_titusDots" in + Y | y) + cloneNeovim + backupNeovimConfig + linkNeovimConfig + ;; + N | n) + printf "%b\n" "${YELLOW}Installation complete.." + ;; + *) + cloneNeovim + backupNeovimConfig + linkNeovimConfig + ;; + esac +} + checkEnv checkEscalationTool installNeovim -printf "%b\n" "${GREEN}Do you also want to install the TitusDotfiles for neovim? (Y/n): ${RC}" -read -r _titusDots -case "$_titusDots" in -Y | y) - cloneNeovim - backupNeovimConfig - linkNeovimConfig - ;; -N | n) - printf "%b\n" "${YELLOW}Installation complete.." - ;; -*) - cloneNeovim - backupNeovimConfig - linkNeovimConfig - ;; -esac +askToClone