Skip to content

Commit

Permalink
refactor(git): add new delta pager
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Feb 20, 2024
1 parent 31d46b7 commit f1dd32a
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions home/isabel/programs/configs/cli/git.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ in {

home.packages = with pkgs; [
gist # manage github gists
act # local github actions
# act # local github actions
gitflow # Extend git with the Gitflow branching model
];

programs = {
# github cli
gh = {
enable = true;
gitCredentialHelper.enable = false; # i use agenix for this anyways
gitCredentialHelper.enable = true;
extensions = with pkgs; [
gh-cal # github activity stats in the CLI
gh-dash # dashboard with pull requests and issues
Expand Down Expand Up @@ -69,19 +69,25 @@ in {
"result-*"
];

delta = {
enable = true;
options = {
features = "decorations side-by-side navigate";
navigate = true;
side-by-side = true;
line-numbers = true;
dark = true;
};
};

extraConfig = {
init.defaultBranch = "main"; # warning the AUR hates this
repack.usedeltabaseoffset = "true";
color.ui = "auto";
diff.algorithm = "histogram"; # a much better diff
help.autocorrect = 10; # 1 second warning to a typo'd command

core = {
pager = "delta";
whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
};

interactive.diffFilter = "delta --color-only"; # provide sytax highlighting for code in "git add -p"
core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";

branch = {
autosetupmerge = "true";
Expand All @@ -103,6 +109,7 @@ in {
merge = {
stat = "true";
conflictstyle = "zdiff3";
tool = "meld";
};

rebase = {
Expand Down

0 comments on commit f1dd32a

Please sign in to comment.