From 873be7be014636865e9c53d2a926f48208353fcf Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Sun, 27 Feb 2022 09:08:17 +0000 Subject: [PATCH] Improve diffs by using the git-delta package Also, switch the diffing to using `zdiff3` and the `histogram` algorithm --- gitconfig | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/gitconfig b/gitconfig index 9db1897..98419b4 100644 --- a/gitconfig +++ b/gitconfig @@ -16,13 +16,13 @@ # Detect whitespace errors when applying a patch whitespace = fix -[color "diff-highlight"] +#[color "diff-highlight"] # Colours for `diff-so-fancy` - oldNormal = "red bold" - oldHighlight = "red bold 52" - newNormal = "green bold" - newHighlight = "green bold 22" + #oldNormal = "red bold" + #oldHighlight = "red bold 52" + #newNormal = "green bold" + #newHighlight = "green bold 22" [filter "lfs"] @@ -41,8 +41,24 @@ # Automatically correct typos in commands autoCorrect = prompt -[pager] +#[pager] # Make diff-so-fancy apply all the time - diff = "diff-so-fancy | less --tabs=4 -RFX" - show = "diff-so-fancy | less --tabs=4 -RFX" + #diff = "diff-so-fancy | less --tabs=4 -RFX" + #show = "diff-so-fancy | less --tabs=4 -RFX" + +[core] + pager = delta + +[interactive] + diffFilter = delta --color-only + +[delta] + navigate = true # use n and N to move between diff sections + +[merge] + conflictstyle = zdiff3 + +[diff] + algorithm = histogram + colorMoved = default