From e7711fe63413d13d5e444e27b56464f84b0bfe57 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Thu, 7 Jul 2022 09:25:17 +0200 Subject: [PATCH] feat(git): use difftastic as diff viewer --- home-manager/git.nix | 6 ++++++ home-mandlm.nix | 1 + 2 files changed, 7 insertions(+) diff --git a/home-manager/git.nix b/home-manager/git.nix index 8a51dd0..e0446a4 100644 --- a/home-manager/git.nix +++ b/home-manager/git.nix @@ -22,6 +22,12 @@ rebase.autostash = true; rerere.enabled = true; worktree.guessRemote = true; + + diff.external = "difft --background light"; + diff.tool = "difftastic"; + difftool.prompt = false; + difftool.difftastic.cmd = "difft --background light \"$LOCAL\" \"$REMOTE\""; + pager.difftool = true; }; aliases = { diff --git a/home-mandlm.nix b/home-mandlm.nix index b804b56..a3e07a2 100644 --- a/home-mandlm.nix +++ b/home-mandlm.nix @@ -26,6 +26,7 @@ tree light element-desktop + difftastic ]; stateVersion = "22.05";