Improve git diff tooling, add jj config

This commit is contained in:
Martin Larsson 2026-03-13 00:17:10 +01:00
parent 29371f8ed2
commit 5d8d946d3e
4 changed files with 31 additions and 9 deletions

View file

@ -7,6 +7,7 @@
whitespace = error whitespace = error
preloadindex = true preloadindex = true
untrackedCache = true untrackedCache = true
pager = delta
[status] [status]
branch = true branch = true
@ -19,15 +20,15 @@
interHunkContext = 10 interHunkContext = 10
algorithm = histogram algorithm = histogram
[pager] [delta]
diff = diff-so-fancy | $PAGER navigate = true
dark = false
[diff-so-fancy] side-by-side = true
markEmptyLines = false pager = "less --RAW-CONTROL-CHARS --quit-if-one-screen"
stripLeadingSymbols = false
[interactive] [interactive]
singleKey = true singleKey = true
diffFilter = delta --color-only
[push] [push]
autoSetupRemote = true autoSetupRemote = true

17
jj/config.toml Normal file
View file

@ -0,0 +1,17 @@
[user]
name = "Martin Larsson"
email = "larssonmartin1998@gmail.com"
[ui]
editor = "nvim"
pager = "delta"
diff-formatter = ":git"
default-command = "log"
[diff]
context-lines = 10
[merge-tools.nvim]
program = "nvim"
merge-args = ["$output"]
merge-tool-edits-conflict-markers = true

View file

@ -53,6 +53,10 @@ let
".config/git" ".config/git"
"git" "git"
] ]
[
".config/jj"
"jj"
]
[ [
".config/colorsync" ".config/colorsync"
"colorsync" "colorsync"
@ -130,7 +134,7 @@ in
bc bc
cmatrix cmatrix
svelte-language-server svelte-language-server
diff-so-fancy delta
obsidian obsidian
helix helix
xh xh

View file

@ -149,8 +149,8 @@ alias ga="git add"
alias gap="git add --patch" alias gap="git add --patch"
alias gi="git init" alias gi="git init"
alias gcl="git clone" alias gcl="git clone"
alias gd="git diff --output-indicator-new=' ' --output-indicator-old=' '" alias gd="git diff"
alias gds="git diff --staged --output-indicator-new=' ' --output-indicator-old=' '" alias gds="git diff --staged"
alias gl="git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'" alias gl="git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'"
alias gm="git merge" alias gm="git merge"
alias gr="git rebase" alias gr="git rebase"