summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-04-08 08:51:49 +0200
committerAlan Pearce2023-04-08 08:51:49 +0200
commit01b1da4680c74ab10869918d22cb81013688480d (patch)
treece6644cc47eb2e1fbdcc778c63476b38fb1fc1a7
parent0e1b432394b60befdca4e268f05441e2835e46b5 (diff)
downloadnixfiles-01b1da4680c74ab10869918d22cb81013688480d.tar.lz
nixfiles-01b1da4680c74ab10869918d22cb81013688480d.tar.zst
nixfiles-01b1da4680c74ab10869918d22cb81013688480d.zip
emacs: auto-discover projectile projects
I no longer need the `add_project` function to add these from a shell
-rw-r--r--user/emacs/init.el1
-rw-r--r--user/zsh/zshrc6
2 files changed, 1 insertions, 6 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 9542a732..276b82c3 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -925,6 +925,7 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
             (add-to-list 'projectile-project-root-files-bottom-up "pnpm-workspace.yaml")
             (setq projectile-kill-buffers-filter 'kill-only-files
                   projectile-sort-order 'modification-time
+                  projectile-project-search-path '(("~/projects/" . 2))
                   projectile-project-root-functions '(projectile-root-local
                                                       projectile-root-top-down
                                                       projectile-root-bottom-up
diff --git a/user/zsh/zshrc b/user/zsh/zshrc
index 48cfc1ef..08b67af9 100644
--- a/user/zsh/zshrc
+++ b/user/zsh/zshrc
@@ -147,12 +147,6 @@ bindkey '^x^k' anyframe-widget-kill
 
 unsetopt flow_control       # Let me use ^S and ^Q
 
-add_project () {
-  project=${1:-$PWD}
-  emacsclient -e "(projectile-add-known-project \"${project}\")"
-}
-compdef '_path_files -/' add_project
-
 esetenv () {
   emacsclient -e "(setenv \"$1\" \"$2\")"
 }