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:
parent
a502143541
commit
e0dd62a108
31
init.el
31
init.el
|
@ -135,7 +135,7 @@
|
||||||
:bind (("C-c b" . ibuffer)))
|
:bind (("C-c b" . ibuffer)))
|
||||||
|
|
||||||
(use-package ibuffer-project
|
(use-package ibuffer-project
|
||||||
:after ibuffer
|
:after (ibuffer project)
|
||||||
:hook ((ibuffer . (lambda ()
|
:hook ((ibuffer . (lambda ()
|
||||||
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
|
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
|
||||||
(unless (eq ibuffer-sorting-mode 'project-file-relative)
|
(unless (eq ibuffer-sorting-mode 'project-file-relative)
|
||||||
|
@ -948,19 +948,26 @@
|
||||||
:after flymake
|
:after flymake
|
||||||
:hook (sh-mode . flymake-shellcheck-load))
|
: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
|
(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
|
:config
|
||||||
(if (file-exists-p "~/.config/")
|
(defun my/project-find-common-projects ()
|
||||||
(project-remember-projects-under "~/.config/" t))
|
"Search common project directories using
|
||||||
(if (file-exists-p "~/Projects/")
|
`project-remember-project-under'."
|
||||||
(project-remember-projects-under "~/Projects/" t))
|
(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))
|
(project-forget-zombie-projects))
|
||||||
|
|
||||||
(use-package magit
|
(use-package magit
|
||||||
|
|
Loading…
Reference in a new issue