all repos — nixfiles @ c59e49501c81400ff0494fc7b6fb2edd11aca7fe

System and user configuration, managed by nix and home-manager

git: enable syntax highlighting in diffs via `delta`
Alan Pearce alan@alanpearce.eu
Fri, 16 Jun 2023 07:35:34 +0200
commit

c59e49501c81400ff0494fc7b6fb2edd11aca7fe

parent

46af3c598d6c79a3196e29cc0bb1ca24e7fcb1b5

2 files changed, 13 insertions(+), 7 deletions(-)

jump to
M user/settings/git.nixuser/settings/git.nix
@@ -12,6 +12,14 @@ user = "alanpearce";       };
       core = {
         commitGraph = true;
+        pager = "${pkgs.delta}/bin/delta";
+      };
+      interactive = {
+        diffFilter = "${pkgs.delta}/bin/delta --color-only";
+      };
+      delta = {
+        navigate = true;
+        light = true;
       };
       pull = {
         rebase = true;
@@ -26,15 +34,12 @@ };       rerere = {
         enable = true;
       };
+      merge = {
+        conflictStyle = "diff3";
+      };
       diff = {
         algorithm = "patience";
-        tool = "icdiff";
-      };
-      difftool = {
-        prompt = false;
-      };
-      "difftool.icdiff" = {
-        cmd = "${pkgs.icdiff}/bin/icdiff --line-numbers $LOCAL $REMOTE";
+        colorMoved = "default";
       };
       "difftool.sopsdiffer" = {
         textconf = "${pkgs.sops}/bin/sops -d";
M user/settings/zsh.nixuser/settings/zsh.nix
@@ -34,6 +34,7 @@ home.packages = with pkgs; [     fzf
     gh
     ghq
+    delta
     git
     gitstatus
     git-lfs