From c0e0516c04b9f9f459fad3df6496aae9fabc0631 Mon Sep 17 00:00:00 2001 From: Glen Goodwin Date: Tue, 7 Nov 2023 15:20:11 -0500 Subject: [PATCH] feat: update git config --- modules/shell/git/home.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/modules/shell/git/home.nix b/modules/shell/git/home.nix index 84adf6a..1085b05 100644 --- a/modules/shell/git/home.nix +++ b/modules/shell/git/home.nix @@ -13,6 +13,36 @@ merge = { ff = "only"; }; + diff = { + algorithm = "patience"; + compactionHeuristic = "true"; + tool = "nvimdiff"; + }; + "difftool \"nvimdiff\"" = { + cmd = "nvim -d \"$LOCAL\" \"$REMOTE\" -c \"wincmd w\" -c \"wincmd L\""; + }; + merge = { + tool = "nvimdiff4"; + prompt = "false"; + }; + "mergetool \"nvimdiff4\"" = { + cmd = "nvim -d $LOCAL $BASE $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'"; + }; + init = { + defaultBranch = "main"; + }; + core = { + pager = "delta"; + editor = "nvim"; + }; + delta = { + features = "side-by-side line-numbers decorations"; + navigate = "true"; + whitespace-error-style = "22 reverse"; + }; + interactive = { + diffFilter = "delta --color-only"; + }; }; }; @@ -25,6 +55,7 @@ home.packages = with pkgs; [ cocogitto + delta lazygit gh pre-commit