Home / Emacs / Magit / Configure!
Show git status in the fringe with diff-hl
Install the diff-hl package.
(with-eval-after-load 'package
(add-to-list 'package-selected-packages 'diff-hl))
Show uncommitted git changes in the fringe.
(add-hook 'after-init-hook #'global-diff-hl-mode)
Show uncommitted changes in Dired.
;; (with-eval-after-load 'dired
;; (add-hook 'dired-mode-hook #'diff-hl-dired-mode))
Refresh diff-hl in lockstep with magit.
(with-eval-after-load 'diff-hl
(with-eval-after-load 'magit
(add-hook 'magit-pre-refresh-hook #'diff-hl-magit-pre-refresh)
(add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh)))
(setopt diff-hl-draw-borders nil)
Reserve C-TAB key for the Tab Bar mode.
(with-eval-after-load 'magit-status
(keymap-set magit-log-mode-map "C-<tab>" nil)
(keymap-set magit-status-mode-map "C-<tab>" nil)
(keymap-set magit-diff-mode-map "C-<tab>" nil)
(keymap-set magit-revision-mode-map "C-<tab>" nil))