Configure diff-hl

This commit is contained in:
Tobias Ostner 2026-04-28 18:35:47 +02:00
parent 200be29c32
commit 8960f44c3b

View file

@ -121,14 +121,15 @@
(denote-rename-buffer-mode 1)) (denote-rename-buffer-mode 1))
(use-package diff-hl (use-package diff-hl
:hook ((prog-mode . diff-hl-mode) :init
(dired-mode . diff-hl-dired-mode) (global-diff-hl-mode 1)
(magit-post-refresh . diff-hl-magit-post-refresh)) (diff-hl-flydiff-mode 1)
:hook
(dired-mode . diff-hl-dired-mode)
(vc-checkin . diff-hl-update)
:config :config
(diff-hl-flydiff-mode)
(unless (display-graphic-p) (unless (display-graphic-p)
(diff-hl-margin-mode 1)) (diff-hl-margin-mode 1)))
(global-diff-hl-mode))
(use-package dired (use-package dired
:init :init
@ -436,8 +437,10 @@
(global-ligature-mode t)) (global-ligature-mode t))
(use-package magit (use-package magit
:defer t :after (nerd-icons diff-hl)
:after nerd-icons :hook
(magit-post-refresh-hook . diff-hl-magit-post-refresh)
(magit-post-refresh . diff-hl-magit-post-refresh)
:custom :custom
(magit-format-file-function #'magit-format-file-nerd-icons) (magit-format-file-function #'magit-format-file-nerd-icons)
(magit-process-connection-type nil)) (magit-process-connection-type nil))