diff --git a/neovim.sh b/neovim.sh index e2911e2..3a7bfaf 100644 --- a/neovim.sh +++ b/neovim.sh @@ -127,14 +127,55 @@ case "$askNvim" in "pika's standard config") - git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim.git "$HOME/.config/nvim" - sleep 0.2 - nvim --headless +q + # git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim.git "$HOME/.config/nvim" + # sleep 0.2 + + local err out + local url="https://git.k4li.de/dotfiles/nvim.git" + spin yellow "Cloning pika's standard config" + # if run install-stuff; then + if run --err err --out out git clone --recursive --depth=1 $url "$HOME/.config/nvim"; then + check "Cloned neovim config" + line + pen "${out:-}" + else + throw "Clone failed!" + pen "${err:-}" + fi + + spin bold yellow "Also sourcing config!" + if run --err err --out out nvim --headless +q; then + check "Prefetching config was successfull" + line + pen "${out:-}" + else + throw "Prefetching has failed hard!" + pen "${err:-}" + fi + ;; "pika's minimal config") - git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim-mini.git "$HOME/.config/nvim" - sleep 0.2 - nvim --headless +q + local url="https://git.k4li.de/dotfiles/nvim-mini.git" + spin yellow "Cloning pika's standard config" + # if run install-stuff; then + if run --err err --out out git clone --recursive --depth=1 $url "$HOME/.config/nvim"; then + check "Cloned neovim config" + line + pen "${out:-}" + else + throw "Clone failed!" + pen "${err:-}" + fi + + spin bold yellow "Also sourcing config!" + if run --err err --out out nvim --headless +q; then + check "Prefetching config was successfull" + line + pen "${out:-}" + else + throw "Prefetching has failed hard!" + pen "${err:-}" + fi ;; none) return 0 ;; *)