Highlight config overrides, default flag, blend alpha#94
Merged
barrettruth merged 5 commits intomainfrom Feb 7, 2026
Merged
Conversation
Problem: the vimdoc config example showed max_lines = 500 under vim, but the actual default in init.lua is 200. Solution: change the example to match the real default.
Problem: DiffsDiff* highlight groups lacked default = true, making them impossible for colorschemes to override, inconsistent with the fugitive unified diff groups which already had it. Solution: add default = true to all four DiffsDiffAdd, DiffsDiffDelete, DiffsDiffChange, and DiffsDiffText nvim_set_hl calls.
Problem: the character-level blend intensity was hardcoded to 0.6, giving users no way to tune how strongly changed characters stand out from the line-level background. Solution: add highlights.blend_alpha config option (number, 0-1, default 0.6) with type validation and range check.
Problem: users had no config-level way to override computed highlight groups and had to call nvim_set_hl externally. Solution: add highlights.overrides table that maps group names to highlight definitions. Overrides are applied after all computed groups without default = true, so they always win over both computed defaults and colorscheme definitions.
a9eea9c to
a0870a7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The highlight system computes groups via
compute_highlight_groups()butgives users no config-level way to override them — they must call
nvim_set_hlexternally. TheDiffsDiff*groups lackdefault = true,making them impossible for colorschemes to override (inconsistent with the
fugitive groups). The vimdoc config example has a wrong default for
vim.max_lines.Solution
vim.max_linesdefault in vimdoc from 500 to 200 to match the actualdefault in init.lua
default = trueto all fourDiffsDiff*nvim_set_hlcalls socolorschemes can override them consistently
highlights.blend_alphaconfig option (number, 0-1, default 0.6) tocontrol character-level blend intensity, with type validation and range
check
highlights.overridesconfig table that maps group names to highlightdefinitions, applied after computed groups without
defaultso overridesalways win