mirror of
https://github.com/larstvei/dot-emacs.git
synced 2025-04-27 08:50:11 +00:00
Fix magit and diff-hl setup
This commit is contained in:
parent
b40c72b5ac
commit
59fd42d8d3
10
init.org
10
init.org
@ -639,25 +639,27 @@
|
||||
|
||||
* Version control
|
||||
|
||||
Magit is the best.
|
||||
[[https://magit.vc/][Magit]] is the best.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
;; A Git porcelain inside Emacs.
|
||||
(use-package magit
|
||||
:hook ((magit-pre-refresh . diff-hl-magit-pre-refresh)
|
||||
(magit-post-refresh . diff-hl-magit-post-refresh))
|
||||
:bind (:map custom-bindings-map ("C-c m" . magit-status)))
|
||||
|
||||
#+end_src
|
||||
|
||||
Have some visual indication where there are uncommitted changes.
|
||||
Have some visual indication where there are uncommitted changes using
|
||||
[[https://github.com/dgutov/diff-hl][~diff-hl~]]. In addition, ~diff-hl~ can be automatically updated when interacting
|
||||
with Magit.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
;; Highlight uncommitted changes using VC
|
||||
(use-package diff-hl
|
||||
:defer t
|
||||
:hook ((magit-pre-refresh . diff-hl-magit-pre-refresh)
|
||||
(magit-post-refresh . diff-hl-magit-post-refresh))
|
||||
:config
|
||||
(global-diff-hl-mode 1))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user