From a499aef62a03b60948a2d10ce63b3b88138dfe15 Mon Sep 17 00:00:00 2001 From: Georgi Dimitrov Date: Sat, 11 Jan 2025 17:09:39 +0200 Subject: [PATCH] zsh: replace the nvm plugin --- scripts/ohmyzsh.sh | 1 - zsh/zshenv | 3 +-- zsh/zshrc | 6 ++++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/ohmyzsh.sh b/scripts/ohmyzsh.sh index 0c22cfd..9994fe5 100755 --- a/scripts/ohmyzsh.sh +++ b/scripts/ohmyzsh.sh @@ -13,7 +13,6 @@ declare -a ZSH_CUSTOM_PLUGINS=( "plugins/zsh-autosuggestions=https://github.com/zsh-users/zsh-autosuggestions" "plugins/zsh-completions=https://github.com/zsh-users/zsh-completions" "plugins/you-should-use=https://github.com/MichaelAquilina/zsh-you-should-use" - "plugins/zsh-nvm=https://github.com/lukechilds/zsh-nvm" "plugins/fzf-tab=https://github.com/Aloxaf/fzf-tab" "plugins/zsh-kitty=https://github.com/redxtech/zsh-kitty" ) diff --git a/zsh/zshenv b/zsh/zshenv index 7199042..bc68d4f 100644 --- a/zsh/zshenv +++ b/zsh/zshenv @@ -44,8 +44,7 @@ fi # NVM export NVM_DIR="${HOME}/.nvm" -export NVM_LAZY_LOAD=true -export NVM_LAZY_LOAD_EXTRA_COMMANDS=('vim' 'nvim') +export NVM_HOMEBREW="$(brew --prefix nvm)" # Append ~/bin directory to PATH if [[ ! "${PATH}" == *${HOME}/bin* ]]; then diff --git a/zsh/zshrc b/zsh/zshrc index eee2fea..ac99fd7 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -21,6 +21,7 @@ plugins=( httpie kubectl npm + nvm terraform vi-mode you-should-use @@ -133,6 +134,11 @@ zle -N kitty_scrollback_edit_command_line bindkey '^x^e' kitty_scrollback_edit_command_line bindkey -M vicmd ' ' kitty_scrollback_edit_command_line +# nvm {{{2 + +zstyle ':omz:plugins:nvm' lazy yes +zstyle ':omz:plugins:nvm' lazy-cmd vim nvim + # Other {{{2 # disable highlighting of pasted text