From c59e49501c81400ff0494fc7b6fb2edd11aca7fe Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 16 Jun 2023 07:35:34 +0200 Subject: git: enable syntax highlighting in diffs via `delta` --- user/settings/git.nix | 19 ++++++++++++------- user/settings/zsh.nix | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/user/settings/git.nix b/user/settings/git.nix index 960e55fc..ed47cac6 100644 --- a/user/settings/git.nix +++ b/user/settings/git.nix @@ -12,6 +12,14 @@ }; 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"; diff --git a/user/settings/zsh.nix b/user/settings/zsh.nix index 885affa1..3b34292a 100644 --- a/user/settings/zsh.nix +++ b/user/settings/zsh.nix @@ -34,6 +34,7 @@ in fzf gh ghq + delta git gitstatus git-lfs -- cgit 1.4.1