summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-05-05 14:58:56 +0200
committerAlan Pearce2017-05-05 14:58:56 +0200
commite4300ae832559cf882db393e3ca9348ff9bf7864 (patch)
tree3b1bca260bda5cee15fb674937fc0f63e2b2e71a
parent9934d6381e2b8fcf313f67986adae9de97e89fc8 (diff)
downloadnixfiles-e4300ae832559cf882db393e3ca9348ff9bf7864.tar.lz
nixfiles-e4300ae832559cf882db393e3ca9348ff9bf7864.tar.zst
nixfiles-e4300ae832559cf882db393e3ca9348ff9bf7864.zip
Emacs: Auto-add node_modules bin folders to path
-rw-r--r--emacs/.emacs.d/init.org11
1 files changed, 11 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index aad14dc0..b9dbfe06 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -1999,6 +1999,17 @@ library implements some refactorings.
             (js2r-add-keybindings-with-prefix "C-c C-m")))
 #+END_SRC
 
+**** add-node-modules-path
+
+Inside a javascript project, it's common to install tools locally to
+the project.  This will allows emacs to find their executables.
+
+#+BEGIN_SRC emacs-lisp
+(use-package add-node-modules-path
+  :config (progn
+            (add-hook 'js2-mode-hook #'add-node-modules-path)))
+#+END_SRC
+
 **** jade (not pug)
 
 Javascript with an inferior node.js process and a debugger?  Awesome.