From c4f675b620880c16135fd4340cd3dc47b20a78e3 Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Wed, 1 Oct 2025 21:37:35 +0100 Subject: Add diff-hl package --- emacs-config.org | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'emacs-config.org') diff --git a/emacs-config.org b/emacs-config.org index 55a02a4..abcb652 100644 --- a/emacs-config.org +++ b/emacs-config.org @@ -1750,3 +1750,29 @@ Completion kind text/icon prefix labelling for emacs in-region completion. (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)) #+end_src +** Diff-hl +#+begin_src elisp + (use-package diff-hl + :custom + (diff-hl-margin-symbols-alist '((insert . "+") + (delete . "-") + (change . "~") + (unknown . "?") + (ignored . "i"))) + + :custom-face + (diff-hl-margin-insert + ((t (:inherit nil :weight bold :background "unspecified-bg" :foreground "green")))) + (diff-hl-margin-change + ((t (:inherit nil :weight bold :background "unspecified-bg" :foreground "goldenrod")))) + (diff-hl-margin-delete + ((t (:inherit nil :weight bold :background "unspecified-bg" :foreground "red")))) + + :config + (global-diff-hl-mode) + (diff-hl-margin-mode) + (diff-hl-flydiff-mode) + + :hook (dired-mode . diff-hl-dired-mode)) +#+end_src + -- cgit