feat(highlight): add configurable blend alpha

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.
This commit is contained in:
Barrett Ruth 2026-02-07 15:46:47 -05:00
parent 8e0c41bf6b
commit b7477e3af2
2 changed files with 20 additions and 2 deletions

View file

@ -56,6 +56,7 @@ Configuration is done via `vim.g.diffs`. Set this before the plugin loads:
highlights = {
background = true,
gutter = true,
blend_alpha = 0.6,
context = {
enabled = true,
lines = 25,
@ -117,6 +118,13 @@ Configuration is done via `vim.g.diffs`. Set this before the plugin loads:
Highlight line numbers with matching colors.
Only visible if line numbers are enabled.
{blend_alpha} (number, default: 0.6)
Alpha value for character-level blend intensity.
Controls how strongly changed characters stand
out from the line-level background. Must be
between 0 and 1 (inclusive). Higher values
produce more vivid character-level highlights.
{context} (table, default: see below)
Syntax parsing context options.
See |diffs.ContextConfig| for fields.