summaryrefslogtreecommitdiffhomepage
path: root/init.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-10-21 04:29:25 +0100
committerjao <jao@gnu.org>2021-10-21 04:29:25 +0100
commit7b5e2c3aaaed8c7272a7c10a26969de7f2f5a400 (patch)
treedea026b006c7637d773ab450106cf48f749bb4a9 /init.org
parentbc8a42ac257c7f7d0e06cf1bae2d9429d7312887 (diff)
downloadelibs-7b5e2c3aaaed8c7272a7c10a26969de7f2f5a400.tar.gz
elibs-7b5e2c3aaaed8c7272a7c10a26969de7f2f5a400.tar.bz2
diff-hl tweaks
Diffstat (limited to 'init.org')
-rw-r--r--init.org24
1 files changed, 17 insertions, 7 deletions
diff --git a/init.org b/init.org
index aaa62fa..d7c39fd 100644
--- a/init.org
+++ b/init.org
@@ -1929,17 +1929,27 @@
(setq auto-revert-check-vc-info nil)
#+END_SRC
*** Diff fringe indicators (diff-hl)
- #+BEGIN_SRC emacs-lisp
+ #+begin_src emacs-lisp
(use-package diff-hl
:ensure t
+ :custom ((diff-hl-draw-borders nil)
+ (diff-hl-side 'right)
+ (diff-hl-margin-symbols-alist
+ '((insert . "+")
+ (delete . "-")
+ (change . "~")
+ (unknown . "?")
+ (ignored . "i"))))
:config
- (setq diff-hl-draw-borders nil
- diff-hl-side 'right)
- (map-keymap (lambda (_k cmd) (put cmd 'repeat-map 'diff-hl-command-map))
+ (map-keymap (lambda (_k cmd)
+ (put cmd 'repeat-map 'diff-hl-command-map))
diff-hl-command-map)
- (add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
- (global-diff-hl-mode)
- #+END_SRC
+ (add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)
+ (diff-hl-margin-mode 1))
+
+ (global-diff-hl-mode 1)
+
+ #+end_src
*** Git config files: more informative diffs
See [[https://protesilaos.com/codelog/2021-01-26-git-diff-hunk-elisp-org/][Informative diff hunks for Emacs Lisp and Org | Protesilaos Stavrou]]
#+begin_src config :tangle ~/.config/git/attributtes :comments no