feat(conflict): show branch names in virtual text labels
Problem: virtual text showed generic "current"/"incoming" labels with no indication of which branch each side came from. Solution: extract the branch name from the marker line itself (e.g. <<<<<<< HEAD, >>>>>>> feature) and display as "HEAD (current)" / "feature (incoming)".
This commit is contained in:
parent
1108c33526
commit
bae86c5fd9
1 changed files with 2 additions and 2 deletions
|
|
@ -108,7 +108,7 @@ local function apply_highlights(bufnr, regions, config)
|
|||
|
||||
if config.show_virtual_text then
|
||||
pcall(vim.api.nvim_buf_set_extmark, bufnr, ns, region.marker_ours, 0, {
|
||||
virt_text = { { ' current', 'DiffsConflictMarker' } },
|
||||
virt_text = { { ' (current)', 'DiffsConflictMarker' } },
|
||||
virt_text_pos = 'eol',
|
||||
})
|
||||
end
|
||||
|
|
@ -177,7 +177,7 @@ local function apply_highlights(bufnr, regions, config)
|
|||
|
||||
if config.show_virtual_text then
|
||||
pcall(vim.api.nvim_buf_set_extmark, bufnr, ns, region.marker_theirs, 0, {
|
||||
virt_text = { { ' incoming', 'DiffsConflictMarker' } },
|
||||
virt_text = { { ' (incoming)', 'DiffsConflictMarker' } },
|
||||
virt_text_pos = 'eol',
|
||||
})
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue