From bae86c5fd9ef148b1ba4b8f13a22dc9ba12c3bda Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sat, 7 Feb 2026 17:57:53 -0500 Subject: [PATCH] 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)". --- lua/diffs/conflict.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/diffs/conflict.lua b/lua/diffs/conflict.lua index 52397fe..6522026 100644 --- a/lua/diffs/conflict.lua +++ b/lua/diffs/conflict.lua @@ -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