diff --git a/init.el b/init.el index 2522e96..855d211 100644 --- a/init.el +++ b/init.el @@ -135,7 +135,7 @@ :bind (("C-c b" . ibuffer))) (use-package ibuffer-project - :after ibuffer + :after (ibuffer project) :hook ((ibuffer . (lambda () (setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups)) (unless (eq ibuffer-sorting-mode 'project-file-relative) @@ -948,19 +948,26 @@ :after flymake :hook (sh-mode . flymake-shellcheck-load)) -(setq project-switch-use-entire-map t - project-switch-commands '((project-find-file "Find file") - (project-find-regexp "Find regexp") - (project-find-dir "Find directory") - (project-eshell "Eshell") - (magit-project-status "Magit"))) - (use-package project + :custom + (project-switch-use-entire-map t) + (project-switch-commands '((project-find-file "Find file") + (project-find-regexp "Find regexp") + (project-find-dir "Find directory") + (project-eshell "Eshell") + (magit-project-status "Magit"))) :config - (if (file-exists-p "~/.config/") - (project-remember-projects-under "~/.config/" t)) - (if (file-exists-p "~/Projects/") - (project-remember-projects-under "~/Projects/" t)) + (defun my/project-find-common-projects () + "Search common project directories using +`project-remember-project-under'." + (interactive) + (require 'project) + (if (file-exists-p "~/.config/") + (project-remember-projects-under "~/.config/" t)) + (if (file-exists-p "~/Projects/") + (project-remember-projects-under "~/Projects/" t)) + (if (file-exists-p "~/Documents/") + (project-remember-projects-under "~/Documents/" t))) (project-forget-zombie-projects)) (use-package magit