Bind SPC p D to +default/discover-projects

Closes #2601
This commit is contained in:
Henrik Lissner 2020-02-25 10:26:21 -05:00
parent 3e9f8b9697
commit b72e00b6ca
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 10 additions and 0 deletions

View file

@ -539,6 +539,7 @@
:desc "Compile in project" "c" #'projectile-compile-project :desc "Compile in project" "c" #'projectile-compile-project
:desc "Repeat last command" "C" #'projectile-repeat-last-command :desc "Repeat last command" "C" #'projectile-repeat-last-command
:desc "Remove known project" "d" #'projectile-remove-known-project :desc "Remove known project" "d" #'projectile-remove-known-project
:desc "Discover projects in folder" "D" #'+default/discover-projects
:desc "Edit project .dir-locals" "e" #'projectile-edit-dir-locals :desc "Edit project .dir-locals" "e" #'projectile-edit-dir-locals
:desc "Find file in project" "f" #'projectile-find-file :desc "Find file in project" "f" #'projectile-find-file
:desc "Find file in other project" "F" #'doom/find-file-in-other-project :desc "Find file in other project" "F" #'doom/find-file-in-other-project

View file

@ -40,3 +40,12 @@
(if (featurep! :completion ivy) (if (featurep! :completion ivy)
(call-interactively #'counsel-file-jump) (call-interactively #'counsel-file-jump)
(λ! (doom-project-find-file default-directory)))) (λ! (doom-project-find-file default-directory))))
;;;###autoload
(defun +default/discover-projects (arg)
"Discover projects in `projectile-project-search-path'.
If prefix ARG is non-nil, prompt for the search path."
(interactive "P")
(if arg
(call-interactively #'projectile-discover-projects-in-directory)
(mapc #'projectile-discover-projects-in-directory projectile-project-search-path)))