summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2019-09-06 12:37:49 +0200
committerAlan Pearce2019-09-06 12:37:49 +0200
commit324c7d35e4721b637b8241fab2bd3265f475df30 (patch)
tree2a27f2fcbd1c05cf4ff1bff40784187cd5940669
parent4fe704808738196d851bcf3a3eee6efe0b31f0d7 (diff)
downloaddotfiles-324c7d35e4721b637b8241fab2bd3265f475df30.tar.lz
dotfiles-324c7d35e4721b637b8241fab2bd3265f475df30.tar.zst
dotfiles-324c7d35e4721b637b8241fab2bd3265f475df30.zip
Emacs: auto-find monorepo sub-projects
-rw-r--r--emacs/.emacs.d/main.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index f74e746..2cd5c23 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -304,6 +304,12 @@ With two prefix arguments, write out the day and month name."
   :config (progn
             (add-to-list 'projectile-globally-ignored-files "package-lock.json")
             (add-to-list 'projectile-globally-ignored-files "pnpm-lock.yaml")
+            (add-to-list 'projectile-project-root-files "package.json")
+            (add-to-list 'projectile-project-root-files-bottom-up "pnpm-workspace.yaml")
+            (setq projectile-project-root-files-functions '(projectile-root-local
+                                                            projectile-root-top-down
+                                                            projectile-root-bottom-up
+                                                            projectile-root-top-down-recurring))
 	    (with-eval-after-load 'evil-ex
 	      (evil-ex-define-cmd "prg" #'projectile-ripgrep)
               (evil-ex-define-cmd "pesh[ell]" #'projectile-run-eshell))))