Skip to content

Commit 48cf200

Browse files
committed
deps: add difftastic + use difft for git diff & show
1 parent b480a8c commit 48cf200

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

modules/packages/cli.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ with pkgs; lib.attrValues {
5050
alternative = [
5151
bat # A cat(1) clone with syntax highlighting and Git integration
5252
colordiff # Compare FILES line by line.hto
53+
difftastic # A syntax-aware diff
5354
eza # A modern replacement for the venerable file-listing command-line program
5455
fd # A simple, fast and user-friendly alternative to 'find'
5556
ripgrep # An interactive replacer for ripgrep that makes it easy to find and replace across files on the command line

unix/.gitconfig

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
excludesFile = ~/.config/git/ignore
1616
attributesFile = ~/.config/git/attributes
1717

18+
[diff]
19+
external = difft
20+
1821
[init]
1922
defaultBranch = main
2023

@@ -133,7 +136,7 @@
133136
remote-set-url-me = !git remote set-url origin [email protected]:\"$(git config --global user.name)\"/\"$(basename $(pwd))\"
134137
res = restore
135138
s = status --show-stash
136-
sh = show
139+
sh = show --ext-diff
137140
ss = status --show-stash -s
138141
st = stash
139142
stm = stash -m
@@ -155,5 +158,9 @@
155158
line-numbers = true
156159
side-by-side = true
157160

161+
[difftool]
162+
# Run the difftool immediately, don't ask 'are you sure' each time.
163+
prompt = false
164+
158165
[http]
159-
sslVerify = false
166+
sslVerify = false

0 commit comments

Comments
 (0)