Skip to content

Define built-in highlight groups added in nvim 0.9-0.12 - #47

Merged
wadackel merged 1 commit into
mainfrom
add-builtin-highlight-groups
Aug 30, 2026
Merged

wadackel merged 1 commit into
mainfrom
add-builtin-highlight-groups

Conversation

@wadackel

Copy link
Copy Markdown
Owner

Summary

Defines 16 built-in highlight groups introduced across nvim 0.9–0.12 that previously fell back to nvim's default colorscheme and clashed with the palette: LspInlayHint, LspCodeLens, ComplHint, DiagnosticDeprecated, DiagnosticUnnecessary, WinBar/WinBarNC, SnippetTabstop, FloatFooter, Substitute, TermCursor, and the popup menu's PmenuKind/PmenuExtra columns with their Sel variants plus PmenuMatchSel.

All values reuse existing palette colors — no new palette entries, no changes to any existing group. Assignments follow each group's default link semantics (SnippetTabstop→Visual, DiagnosticUnnecessary→Comment, Substitute=Search, TermCursor=reverse, Pmenu*Sel=PmenuSel) except where the faithful mapping is unreadable on this palette: inlay hints / code lens / completion hints use weakfg (Comment-toned, 2.4:1) because the default link target NonText maps to darkfg at 1.36:1 here, and PmenuKind/PmenuExtra use lightfg as a readable step below the menu text.

Deliberately left undefined:

  • NormalNC — defining it would restyle inactive windows.
  • ComplMatchIns — upstream deliberately ships default link ComplMatchIns NONE; styling it would repaint buffer text on every completion insert.

All 16 names verified to exist as built-in groups on nvim 0.12.3 (hlexists), and the generated diff is 16 added lines with zero changes to existing output.

Test plan

  • just check (fmt + clippy -D warnings + all 14 tests, golden test included)
  • just fresh-check — regenerated outputs match the committed files
  • Contrast ratios measured for every readable-text assignment (recorded in the plan)
  • CI green

References

  • n/a

🤖 Generated with Claude Code

https://claude.ai/code/session_01YFHQwnUznbUjeJepbqUsj1

Fills the gaps where modern UI surfaces fell back to nvim's own
default colorscheme and clashed with the palette: inlay hints, code
lens, deprecated/unnecessary diagnostics, winbar, snippet tabstops,
float footers, :substitute preview, terminal cursor, and the popup
menu's kind/extra columns with their selected and matched variants,
plus ComplHint for the native completion UI.

Assignments map each group's default link onto the existing palette
(SnippetTabstop→visualbg via Visual, DiagnosticUnnecessary→weakfg via
Comment, Substitute=Search, TermCursor=reverse, Pmenu*Sel=PmenuSel).
Where the faithful mapping is unreadable on this palette the value
deviates deliberately: InlayHint/CodeLens/ComplHint use weakfg because
dogrun's NonText (the default link target) sits at 1.36:1 over the
background, and PmenuKind/Extra use lightfg as a readable step below
the menu text. NormalNC stays undefined (it would restyle inactive
windows), and ComplMatchIns stays undefined to honor upstream's
deliberate `default link ComplMatchIns NONE` — styling it would
repaint buffer text on every completion insert.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YFHQwnUznbUjeJepbqUsj1
@wadackel
wadackel merged commit 354919a into main Aug 30, 2026
1 check passed
@wadackel
wadackel deleted the add-builtin-highlight-groups branch August 30, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant