nvim: Improve jj diff conflict resolution
Currently invoked via `jj resolve --tool diffconflicts`
This commit is contained in:
parent
57a7149807
commit
9afb34fd26
3 changed files with 27 additions and 3 deletions
|
|
@ -29,6 +29,7 @@
|
||||||
"hunk.nvim": { "branch": "master", "commit": "1e0a4d719c780bb8b0690a54915601508ced321e" },
|
"hunk.nvim": { "branch": "master", "commit": "1e0a4d719c780bb8b0690a54915601508ced321e" },
|
||||||
"image.nvim": { "branch": "master", "commit": "a4638ec549c6aa56264cb0371255192ff37a8a90" },
|
"image.nvim": { "branch": "master", "commit": "a4638ec549c6aa56264cb0371255192ff37a8a90" },
|
||||||
"img-clip.nvim": { "branch": "main", "commit": "0bb8b5ced45c2672c70184c87d014194b0705815" },
|
"img-clip.nvim": { "branch": "main", "commit": "0bb8b5ced45c2672c70184c87d014194b0705815" },
|
||||||
|
"jj-diffconflicts": { "branch": "feat/remove-instruction-message", "commit": "ee3f9179b2ab94d5177d3935fbf2bc94258d3541" },
|
||||||
"jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" },
|
"jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" },
|
||||||
"lazy-events.nvim": { "branch": "main", "commit": "63802b7ddc852bdfa29e33b158d52429276fa742" },
|
"lazy-events.nvim": { "branch": "main", "commit": "63802b7ddc852bdfa29e33b158d52429276fa742" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,20 @@ return {
|
||||||
{ "nvim-tree/nvim-web-devicons", optional = true },
|
{ "nvim-tree/nvim-web-devicons", optional = true },
|
||||||
},
|
},
|
||||||
cmd = { "DiffEditor" },
|
cmd = { "DiffEditor" },
|
||||||
config = function()
|
-- config = function()
|
||||||
require("hunk").setup()
|
-- require("hunk").setup()
|
||||||
end,
|
-- end,
|
||||||
|
opts = {
|
||||||
|
keys = {
|
||||||
|
global = {
|
||||||
|
quit = { "<leader>q" },
|
||||||
|
},
|
||||||
|
diff = { -- default to toggling line on both sides of diff with a
|
||||||
|
toggle_line = { "s" }, -- imagine it is '[s]ingle side'
|
||||||
|
toggle_line_pair = { "a" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
{ "rafikdraoui/jj-diffconflicts", lazy = false },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,17 @@ private-commits = "description(glob-i:'WIP:*') | description(glob-i:'PRIVATE:*')
|
||||||
[ui]
|
[ui]
|
||||||
default-command = ["log", "-T", "builtin_log_oneline", "-r", "stack()"]
|
default-command = ["log", "-T", "builtin_log_oneline", "-r", "stack()"]
|
||||||
diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]
|
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
|
# use delta as formatter but _only_ for diff and show
|
||||||
# see: https://github.com/jj-vcs/jj/discussions/4690#discussioncomment-12388965
|
# see: https://github.com/jj-vcs/jj/discussions/4690#discussioncomment-12388965
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue