[Emacs] Replace npm-mode with npm-transient

This commit is contained in:
Lucien Cartier-Tilet 2022-07-12 04:30:31 +02:00
parent ca38157732
commit 0cc2c90262
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -7450,22 +7450,19 @@ receives some commits!
#+end_src #+end_src
Which Emacser prefers the command line over Emacs itself? I dont. Which Emacser prefers the command line over Emacs itself? I dont.
Lets interact with NPM through Emacs then. For the record, Im using Lets interact with NPM through Emacs then.
my own fork of npm-mode which fixes the issue of the npm buffer being
unreadable.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package npm-mode (use-package npm-transient
:defer t :defer t
:straight (npm-mode :build t :straight (npm-transient :build t
:type git :type git
:fork t) :host github
:hook (js-mode . npm-mode) :repo "Phundrak/npm-transient"))
:hook (web-mode . npm-mode) ;; :general
:general ;; (phundrak/major-leader-key
(phundrak/major-leader-key ;; :packages '(npm-transient rjsx-mode web-mode)
:packages '(npm-mode rjsx-mode web-mode) ;; :keymaps '(rjsx-mode-map web-mode-map)
:keymaps '(rjsx-mode-map web-mode-map) ;; "n" #'npm-transient))
"n" '(:keymap npm-mode-command-keymap :which-key "npm")))
#+end_src #+end_src
And finally, here is a formatter for Javascript. And finally, here is a formatter for Javascript.