Set up nvm
This commit is contained in:
parent
6352fbb697
commit
f132f9fa7b
@ -2,17 +2,11 @@
|
|||||||
|
|
||||||
;; node version manager
|
;; node version manager
|
||||||
(use-package nvm
|
(use-package nvm
|
||||||
:commands (nvm-use
|
:straight (:host github :repo "rejeep/nvm.el")
|
||||||
nvm-use-for
|
:commands (nvm-use)
|
||||||
|
:autoload (nvm-use-for
|
||||||
nvm-use-for-buffer
|
nvm-use-for-buffer
|
||||||
nvm--installed-versions)
|
nvm--installed-versions))
|
||||||
:init
|
|
||||||
(defun nvm (version)
|
|
||||||
(interactive (list
|
|
||||||
(completing-read "Node version: "
|
|
||||||
(mapcar #'car
|
|
||||||
(nvm--installed-versions)))))
|
|
||||||
(nvm-use version)))
|
|
||||||
|
|
||||||
(use-package json-mode
|
(use-package json-mode
|
||||||
:commands (json-mode)
|
:commands (json-mode)
|
||||||
|
@ -94,6 +94,7 @@ fi
|
|||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
plugins=(git direnv pipenv npm nvm rbenv pass aws)
|
plugins=(git direnv pipenv npm nvm rbenv pass aws)
|
||||||
|
zstyle ':omz:plugins:nvm' autoload true
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
@ -272,3 +273,7 @@ PROMPT=$PROMPT'%{$(vterm_prompt_end)%}'
|
|||||||
type navi > /dev/null && eval "$(navi widget zsh)"
|
type navi > /dev/null && eval "$(navi widget zsh)"
|
||||||
|
|
||||||
eval "$(rbenv init - zsh)"
|
eval "$(rbenv init - zsh)"
|
||||||
|
|
||||||
|
export NVM_DIR="$HOME/.nvm"
|
||||||
|
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
|
||||||
|
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
|
||||||
|
Loading…
Reference in New Issue
Block a user