From eb62d02a00b1b05c2107c6303a5c75046d00c955 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 1 Dec 2024 11:23:28 +0100 Subject: emacs: Git/Magit configurations --- .config/emacs/modules/mm-projects.el | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to '.config/emacs/modules/mm-projects.el') diff --git a/.config/emacs/modules/mm-projects.el b/.config/emacs/modules/mm-projects.el index 2ce88f7..058da8e 100644 --- a/.config/emacs/modules/mm-projects.el +++ b/.config/emacs/modules/mm-projects.el @@ -34,6 +34,14 @@ This is intended to be called interactively via (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 @@ -43,9 +51,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 +72,14 @@ 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’ + :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 -- cgit v1.2.3