Skip to content
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions core/tabs/applications-setup/Developer-tools/neovim-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ cloneNeovim() {

installNeovim() {
if ! command_exists neovim ripgrep git fzf; then
printf "%b\n" "${YELLOW}Installing Neovim...${RC}"
case "$PACKAGER" in
printf "%b\n" "${YELLOW}Installing Neovim...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck git
;;
apt-get|nala)
apt-get | nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y ripgrep fd-find python3-venv luarocks golang-go shellcheck git
curl -sSLo /tmp/nvim.appimage https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x /tmp/nvim.appimage
"$ESCALATION_TOOL" mv /tmp/nvim.appimage /usr/local/bin/nvim
;;
dnf|zypper)
dnf | zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
esac
fi
}

Expand All @@ -51,9 +51,22 @@ 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
N | n)
printf "%b\n" "${YELLOW}Installation complete.."
;;
*)
cloneNeovim
backupNeovimConfig
linkNeovimConfig
;;
esac
}

checkEnv
checkEscalationTool
installNeovim
cloneNeovim
backupNeovimConfig
linkNeovimConfig
askToClone