summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/mm-projects.el
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs/modules/mm-projects.el')
-rw-r--r--.config/emacs/modules/mm-projects.el52
1 files changed, 39 insertions, 13 deletions
diff --git a/.config/emacs/modules/mm-projects.el b/.config/emacs/modules/mm-projects.el
index 2ce88f7..be80789 100644
--- a/.config/emacs/modules/mm-projects.el
+++ b/.config/emacs/modules/mm-projects.el
@@ -20,21 +20,34 @@ This is intended to be called interactively via
(mm-projects-project-magit-status "Git Status" ?s)))
:config
(unless mm-darwin-p
- (if-let ((repo-directory (getenv "REPODIR"))
- (directories
- (cl-loop
- for author in (directory-files repo-directory :full "\\`[^.]")
- append (cl-loop
- for path in (directory-files author :full "\\`[^.]")
- collect (list (concat path "/"))))))
- (progn
- (with-temp-buffer
- (prin1 directories (current-buffer))
- (write-file project-list-file))
- (project--read-project-list))
+ (if-let ((repo-directory (getenv "REPODIR")))
+ (with-eval-after-load 'async
+ (async-start
+ (lambda ()
+ (require 'project)
+ (let* ((list-dir
+ (lambda (path)
+ (directory-files path :full "\\`[^.]")))
+ (directories
+ (cl-loop for author in (funcall list-dir (getenv "REPODIR"))
+ append (cl-loop for path in (funcall list-dir author)
+ collect (list (concat path "/"))))))
+ (with-temp-buffer
+ (prin1 directories (current-buffer))
+ (write-file project-list-file))))
+ (lambda (_proc)
+ (project--read-project-list))))
(warn "The REPODIR environment variable is not set."))))
+;;; Emacs VC
+
+(use-package vc-hooks
+ :custom
+ (vc-follow-symlinks t)
+ (vc-handled-backends '(Git)))
+
+
;;; Git Client
(use-package magit
@@ -43,9 +56,13 @@ This is intended to be called interactively via
("[" . magit-section-backward-sibling)
("]" . magit-section-forward-sibling))
:custom
- (transient-default-level 7)
+ (git-commit-style-convention-checks
+ '(non-empty-second-line overlong-summary-line))
+ (git-commit-summary-max-length 50)
+ (magit-diff-refine-hunk t)
(magit-display-buffer-function
#'magit-display-buffer-same-window-except-diff-v1)
+ (transient-default-level 7)
:config
(transient-define-suffix mm-projects-magit-push-current-to-all-remotes (args)
"Push the current branch to all remotes."
@@ -60,6 +77,15 @@ This is intended to be called interactively via
(transient-append-suffix #'magit-push '(1 -1)
'("a" "all remotes" mm-projects-magit-push-current-to-all-remotes)))
+(use-package magit-repos
+ :ensure nil ; Part of ‘magit’
+ :if (not mm-darwin-p)
+ :commands (magit-list-repositories)
+ :init
+ (if-let ((directory (getenv "REPODIR")))
+ (setopt magit-repository-directories `((,directory . 2)))
+ (warn "The REPODIR environment variable is not set.")))
+
(use-package magit-todos
:ensure t
:after magit