.emacs.d/lisp/init-vc.el
2024-09-06 11:42:11 +02:00

19 lines
657 B
EmacsLisp

;;; init-vc.el --- Version control support -*- lexical-binding: t -*-
;;; Commentary:
;; Most version control packages are configured separately: see
;; init-git.el, for example.
;;; Code:
(when (maybe-require-package 'diff-hl)
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)
(add-hook 'after-init-hook 'global-diff-hl-mode)
(with-eval-after-load 'diff-hl
(define-key diff-hl-mode-map (kbd "<left-fringe> <mouse-1>") 'diff-hl-diff-goto-hunk)
(define-key diff-hl-mode-map (kbd "M-C-]") 'diff-hl-next-hunk)
(define-key diff-hl-mode-map (kbd "M-C-[") 'diff-hl-previous-hunk)))
(provide 'init-vc)
;;; init-vc.el ends here