Add add-node-modules-path package to lang/javascript

And use it on json-mode.
This commit is contained in:
Henrik Lissner 2020-04-23 17:04:31 -04:00
parent 346a90c95d
commit 17dd1c6527
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 3 additions and 13 deletions

View file

@ -83,18 +83,6 @@ Run this for any buffer you want to skewer."
;;
;; Hooks
;;;###autoload
(defun +javascript-add-node-modules-path-h ()
"Add current project's `node_modules/.bin` to `exec-path', so js tools
prioritize project-local packages over global ones."
(make-local-variable 'exec-path)
(cl-pushnew (expand-file-name "node_modules/.bin/"
(or (locate-dominating-file
(or (buffer-file-name) default-directory)
"node_modules")
(doom-project-root)))
exec-path :test #'string=))
;;;###autoload
(defun +javascript-cleanup-tide-processes-h ()
"Clean up dangling tsserver processes if there are no more buffers with