fix(treesitter): highlight group for EditQuery captures #36265

fix(treesitter): more distinctive highlight for EditQuery captures

Problem: EditQuery shows captures in the source buffer using the Title
highlight group, which could be too similar to Normal.

Solution: Use a virtual text diagnostic highlight group: they are
displayed in a similar manner to the query captures so we can assume
that the color scheme should have appropriate styling applied to make
them visible.
This commit is contained in:
Michele Campeotto
2026-02-12 14:07:13 +01:00
committed by GitHub
parent fd69b71119
commit d0822bbd15
3 changed files with 11 additions and 7 deletions

View File

@@ -608,7 +608,7 @@ local function update_editor_highlights(query_win, base_win, lang)
end_col = end_col,
hl_group = 'Visual',
virt_text = {
{ capture_name, 'Title' },
{ capture_name, 'DiagnosticVirtualTextHint' },
},
})
end