From 8df4740d1f48965941ad2f8a901f77ca48963685 Mon Sep 17 00:00:00 2001 From: Ted Kulp Date: Fri, 24 Sep 2021 08:05:18 -0400 Subject: [PATCH] minor fixes * Set EDITOR to lvim * Add install of nvm and starship to bootstrap * Remove hard-coded paths from nvm.zsh --- .config/yadm/bootstrap | 17 +++++++++-------- .config/zsh/nvm.zsh | 4 ++-- .config/zsh/vim.zsh | 1 + 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index cc3c1a8..16a0430 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -38,11 +38,6 @@ if [ "$system_type" = "Darwin" ]; then echo "Updating homebrew bundle" brew bundle --global fi - - # Install starship if necessary - if ! command -v starship >/dev/null 2>&1; then - sh -c "$(curl -fsSL https://starship.rs/install.sh)" - fi fi # Linux Specifics @@ -98,9 +93,15 @@ if [ "$system_type" = "Linux" ]; then gobrew use 1.17 fi - # Install powerline-go if necessary - if ! command -v powerline-go >/dev/null 2>&1; then - go install github.com/justjanne/powerline-go@latest + # Install nvm if necessary + if [ ! -d "$HOME/.nvm" ]; then + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash + yadm checkout ~/.zshrc # nvm adds stuff that is already in ~/.config/zsh/nvm.zsh + fi + + # Install starship if necessary + if ! command -v starship >/dev/null 2>&1; then + sh -c "$(curl -fsSL https://starship.rs/install.sh)" fi # Install docker if necessary diff --git a/.config/zsh/nvm.zsh b/.config/zsh/nvm.zsh index 0e0debf..e6f7612 100644 --- a/.config/zsh/nvm.zsh +++ b/.config/zsh/nvm.zsh @@ -1,6 +1,6 @@ export NVM_DIR="$HOME/.nvm" -[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm -[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion autoload -U add-zsh-hook load-nvmrc() { diff --git a/.config/zsh/vim.zsh b/.config/zsh/vim.zsh index 9461841..a905a53 100644 --- a/.config/zsh/vim.zsh +++ b/.config/zsh/vim.zsh @@ -8,3 +8,4 @@ alias vi="nvim" alias vim="lvim" alias vi="lvim" export PATH=~/.local/bin:$PATH +export EDITOR="lvim"