From 7319372c3ed208b97aa11e9b38ccdcaa52b21fc2 Mon Sep 17 00:00:00 2001 From: Tobias Ostner Date: Sat, 21 Mar 2026 15:04:42 +0100 Subject: [PATCH] Install and configure diff-hl --- flakes/emacs/config/init.el | 10 ++++++++++ flakes/emacs/home.nix | 1 + 2 files changed, 11 insertions(+) diff --git a/flakes/emacs/config/init.el b/flakes/emacs/config/init.el index 38dbd85..be84ad3 100644 --- a/flakes/emacs/config/init.el +++ b/flakes/emacs/config/init.el @@ -116,6 +116,16 @@ (setq denote-directory (expand-file-name "~/TobCloud/Denote/")) (denote-rename-buffer-mode 1)) +(use-package diff-hl + :hook ((prog-mode . diff-hl-mode) + (dired-mode . diff-hl-dired-mode) + (magit-post-refresh . diff-hl-magit-post-refresh)) + :config + (diff-hl-flydiff-mode) + (unless (display-graphic-p) + (diff-hl-margin-mode 1)) + (global-diff-hl-mode)) + (use-package dired :init (setq dired-dwim-target t diff --git a/flakes/emacs/home.nix b/flakes/emacs/home.nix index 61d0655..0a3074d 100644 --- a/flakes/emacs/home.nix +++ b/flakes/emacs/home.nix @@ -57,6 +57,7 @@ copilot corfu denote + diff-hl dockerfile-mode ef-themes eglot