diff options
author | Alan Pearce | 2017-06-18 22:53:42 +0200 |
---|---|---|
committer | Alan Pearce | 2017-06-18 22:55:43 +0200 |
commit | 7040490859f5c771c45bcf147d9e2b57f0117d9e (patch) | |
tree | 67d4ae0ccc65952ee158757a5886903f02ddf56f | |
parent | 410d44b81165a38e59924ad93a3bfab030db6f36 (diff) | |
download | nixfiles-7040490859f5c771c45bcf147d9e2b57f0117d9e.tar.lz nixfiles-7040490859f5c771c45bcf147d9e2b57f0117d9e.tar.zst nixfiles-7040490859f5c771c45bcf147d9e2b57f0117d9e.zip |
Emacs: Support nodeJS projects in projectile
-rw-r--r-- | emacs/.emacs.d/init.org | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 645bdcd6..81cba44e 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -570,7 +570,17 @@ ones. (expand-file-name project-dir (ghq--find-root)) arg))) (setq projectile-switch-project-action #'projectile-commander - projectile-completion-system 'ivy))) + projectile-completion-system 'ivy + projectile-create-missing-test-files t) + + (defun ap/projectile-test-suffix (project-type) + (cond + ((member project-type '(node-yarn node-npm)) ".test") + (t (projectile-test-suffix project-type)))) + (setq projectile-test-suffix-function #'ap/projectile-test-suffix) + + (projectile-register-project-type 'node-yarn '("yarn.lock") "yarn start" "yarn test") + (projectile-register-project-type 'node '("package.json") "npm start" "npm test"))) (use-package counsel-projectile :after (counsel projectile) |