From e70ca97656df3adbdbbb5aac20b50e2768afeb20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Thu, 24 Oct 2019 08:42:30 +0200 Subject: [PATCH] feat(git): use diff-so-fancy --- configs/git.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/configs/git.nix b/configs/git.nix index e88f91a..b505d87 100644 --- a/configs/git.nix +++ b/configs/git.nix @@ -64,6 +64,26 @@ graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"; }; ignores = config.niveum.ignore; + extraConfig = { + core.pager = "${pkgs.gitAndTools.diff-so-fancy}/bin/diff-so-fancy | ${pkgs.less}/bin/less --tabs=4 -RFX"; + color = { + ui = true; + diff = { + meta = "11"; + frag = "magenta bold"; + commit = "yellow bold"; + old = "red bold"; + new = "green bold"; + whitespace = "red reverse"; + }; + diff-highlight = { + oldNormal = "red bold"; + oldHighlight = "red bold 52"; + newNormal = "green bold"; + newHighlight = "green bold 22"; + }; + }; + }; }; }; }