summary refs log tree commit diff
path: root/emacs.d/custom/fcuny-git.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.d/custom/fcuny-git.el')
-rw-r--r--emacs.d/custom/fcuny-git.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/emacs.d/custom/fcuny-git.el b/emacs.d/custom/fcuny-git.el
index 088b895..48409a7 100644
--- a/emacs.d/custom/fcuny-git.el
+++ b/emacs.d/custom/fcuny-git.el
@@ -11,13 +11,22 @@
 
 (use-package magit
   :ensure t
-  :mode (("\\COMMIT_EDITMSG\\'" . text-mode)
-         ("\\MERGE_MSG\\'"      . text-mode))
   :after (flyspell)
   :bind (("C-x g" . magit-status))
   :custom
+  (vc-follow-symlinks t))
+
+(use-package git-commit
+  :ensure t
+  :after magit
+  :hook (git-commit-mode . fcuny/git-commit-auto-fill)
+  :custom
   (git-commit-summary-max-length 50)
-  (fill-column 72))
+  :preface
+  (defun fcuny/git-commit-auto-fill ()
+    "Ensures that the commit body does not exceed 72 characters."
+    (setq-local fill-column 72)
+    (setq-local comment-auto-fill-only-comments nil)))
 
 ;; https://magit.vc/manual/magit/Per_002dRepository-Configuration.html
 ;; we don't want to refresh buffers in source. This should help with