Project config update

Don't search for projects on package load as it slows down startup too
much, wrap in interactive function to call as and when I want it

Move package variable customisation into use-package block
This commit is contained in:
Evie Litherland-Smith 2024-05-13 09:54:13 +01:00
parent a502143541
commit e0dd62a108

31
init.el
View file

@ -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