Add nvm.el to manage node versions within Emacs

This commit is contained in:
Jeremy Dormitzer 2020-02-11 10:58:00 -05:00
parent 6662ddd9fb
commit f616ec6cac

View File

@ -2278,6 +2278,24 @@ A command to format JS via prettier:
(shell-command-on-region start end (concat "prettier --parser " parser) nil t))) (shell-command-on-region start end (concat "prettier --parser " parser) nil t)))
#+END_SRC #+END_SRC
** NVM
Manage node version via NVM within Emacs:
#+BEGIN_SRC emacs-lisp
(use-package nvm
:commands (nvm-use
nvm-use-for
nvm-use-for-buffer
nvm--installed-versions)
:init
(defun nvm (version)
(interactive (list
(completing-read "Node version: "
(mapcar #'car
(nvm--installed-versions)))))
(nvm-use version)))
#+END_SRC
* Typescript * Typescript
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package typescript-mode (use-package typescript-mode