Skip to content

Commit

Permalink
git: use delta as git-diff tool
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarnajjar committed Feb 22, 2021
1 parent 6a9fa20 commit ba70022
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions asdf/default-cargo-crates
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bat
ripgrep
git-delta
22 changes: 22 additions & 0 deletions git/config
Original file line number Diff line number Diff line change
@@ -1,20 +1,42 @@
[user]
name = Ammar Najjar

[core]
editor = nvim
pager = delta

[alias]
lol = log --graph --decorate --pretty=oneline --abbrev-commit --all
lg1 = log --graph --pretty=format:'%C(bold yellow)%h%Creset -%C(bold cyan)%aD%C(reset) %C(bold green)%d%Creset %s %C(bold blue)<%an>%Creset' --abbrev-commit
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold yellow)%h%C(reset) - %C(bold cyan)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold green)%d%C(reset)' --all
lg3 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
gco = "!f() { git branch -a | grep -e $1 -m 1 | sed 's/remotes\\/origin\\///' | xargs git checkout; }; f"

[color]
ui = true

[commit]
template = ~/.config/git/gitmessage

[changelog]
format = * %h %B

[init]
defaultBranch = master

[push]
default = current

[interactive]
diffFilter = delta --color-only

[delta]
features = line-numbers decorations
file-modified-label = modified:
syntax-theme = Sublime Snazzy
whitespace-error-style = 22 reverse

[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none

0 comments on commit ba70022

Please sign in to comment.