summary refs log tree commit diff
path: root/emacs.d/modules/module-git.el
blob: f974bfed6ee15cf0615335e2fde9024d3e59f98d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
(require 'config-package)

(use-package magit
  :mode (("differential-update-comments" . git-commit-mode)
         ("new-commit"                   . git-commit-mode))

  :bind (("C-x g s" . magit-status)
         ("C-x g b" . magit-checkout))

  :init
  (progn
    (setq magit-completing-read-function 'ivy-completing-read))

  :config
  (progn
    (global-git-commit-mode)
    (use-package git-commit :ensure t :defer t)
    (add-hook 'magit-mode-hook
              (lambda()
                (setq mode-name "⎇")))
    (add-hook 'magit-log-edit-mode-hook
              #'(lambda ()
                  (set-fill-column 72)
                  (flyspell-mode)))))

;; I don't care about any frontend other than magit
(setf vc-handled-backends nil
      vc-follow-symlinks t)

(provide 'module-git)