Add add-node-modules-path package to lang/javascript
And use it on json-mode.
This commit is contained in:
parent
346a90c95d
commit
17dd1c6527
3 changed files with 3 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue