nvim: Improve jj diff conflict resolution

Currently invoked via `jj resolve --tool diffconflicts`
This commit is contained in:
Marty Oehme 2025-08-23 12:38:45 +02:00
parent 57a7149807
commit 9afb34fd26
Signed by: Marty
GPG key ID: 4E535BC19C61886E
3 changed files with 27 additions and 3 deletions

View file

@ -13,6 +13,17 @@ private-commits = "description(glob-i:'WIP:*') | description(glob-i:'PRIVATE:*')
[ui]
default-command = ["log", "-T", "builtin_log_oneline", "-r", "stack()"]
diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]
diff-instructions = false # don't add the JJ-INSTRUCTIONS file to diffs
merge-editor = "dc"
[merge-tools.dc] # the 'diffconflicts' plugin for nvim
program = "nvim"
merge-args = [
"-c", "let g:jj_diffconflicts_marker_length=$marker_length",
"-c", "let g:jj_diffconflicts_turn_off_instructions=1",
"-c", "JJDiffConflicts!", "$output", "$base", "$left", "$right"
]
merge-tool-edits-conflict-markers = true
# use delta as formatter but _only_ for diff and show
# see: https://github.com/jj-vcs/jj/discussions/4690#discussioncomment-12388965