From 7b5e2c3aaaed8c7272a7c10a26969de7f2f5a400 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 21 Oct 2021 04:29:25 +0100 Subject: diff-hl tweaks --- init.org | 24 +++++++++++++++++------- 1 file 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 -- cgit v1.2.3