feat(highlights): new Dimmed hl group for de-emphasized text #39505

Problem:
Many color schemes assume the Comment hl group is dim text and use it
for secondary text, decorations, or parts of UI. This is true for many
color schemes but not all.

Solution:
Introducing a new highlight group with a more specific meaning, similar
to Underlined or Ignore.

The new group links to Comment by default so the behavior is unchanged
for color schemes that don't define it.
This commit is contained in:
Michele Campeotto
2026-05-13 19:54:34 +00:00
committed by GitHub
parent d3f3d75451
commit 6780e78b09
5 changed files with 6 additions and 3 deletions

View File

@@ -148,7 +148,7 @@ EVENTS
HIGHLIGHTS
todo
`Dimmed` for text that should be de-emphasized.
LSP

View File

@@ -234,6 +234,7 @@ SpecialComment special things inside a comment
Debug debugging statements
Underlined text that stands out, HTML links
Dimmed text that is de-emphasized
Ignore left blank, hidden |hl-Ignore|

View File

@@ -186,7 +186,7 @@ function vim.show_pos(buf, row, col, filter)
append(' ')
end
if comment then
append(comment, 'Comment')
append(comment, 'Dimmed')
end
nl()
end
@@ -244,7 +244,7 @@ function vim.show_pos(buf, row, col, filter)
item(extmark.opts, extmark.ns)
else
append(' - ')
append(extmark.ns, 'Comment')
append(extmark.ns, 'Dimmed')
nl()
end
end

View File

@@ -218,6 +218,7 @@ static const char *highlight_init_both[] = {
"default link Debug Special",
// Used by HLF_8 (very common). None of the HLF_* things use the other Special* groups.
"default link SpecialKey Special",
"default link Dimmed Comment",
"default link Ignore Normal",
// Built-in LSP

View File

@@ -78,6 +78,7 @@ local predefined_hl_defs = {
Delimiter = true,
SpecialComment = true,
Debug = true,
Dimmed = true,
-- From highlight_init_(dark|light)
ColorColumn = true,