(when (maybe-require-package 'diff-hl)
  (add-hook 'prog-mode-hook 'diff-hl-mode)
  (add-hook 'vc-dir-mode-hook 'diff-hl-mode)
  (add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)

  (after-load 'diff-hl
    (define-key diff-hl-mode-map
      (kbd "<left-fringe> <mouse-1>")
      'diff-hl-diff-goto-hunk)))

(maybe-require-package 'browse-at-remote)

(provide 'init-vc)

(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)

  (after-load 'diff-hl
    (define-key diff-hl-mode-map
      (kbd "<left-fringe> <mouse-1>")
      'diff-hl-diff-goto-hunk)))

(maybe-require-package 'browse-at-remote)

(provide 'init-vc)

Enable diff-hl globally, not just in prog-mode
Enable diff-hl globally, not just in prog-mode

emuio/emacs.d,benkha/emacs.d,krzysz00/emacs.d,arthurl/emacs.d,sgarciac/emacs.d,qianwan/emacs.d,purcell/emacs.d,lust4life/emacs.d,kongfy/emacs.d,svenyurgensson/emacs.d,mmqmzk/emacs.d,dcorking/emacs.d,braveoyster/emacs.d,baohaojun/emacs.d,cjqw/emacs.d,blueseason/emacs.d,gsmlg/emacs.d,blueabysm/emacs.d,me020523/emacs.d,wegatron/emacs.d,kindoblue/emacs.d