refactor: centralize hunk highlight option construction #144
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
barrettruth/diffs.nvim#144
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracked By
Context
This is pre-v0.4.0 cleanup that should land on
mainbefore the hard-removal branch. It must preserve current v0.3.x behavior, including fixed defaulthighlights.prioritiesand deprecation handling for user-provided priority values.Problem
Runtime hunk highlight option construction is repeated across runtime paths:
lua/diffs/runtime/init.lualua/diffs/runtime/cache.luaruntime.get_highlight_opts()consumers such as gitsignsThat makes the render option shape harder to reason about before the later hard-removal pass.
Scope
Centralize hunk highlight option construction in a runtime/renderer-owned helper while preserving current config behavior.
Do not remove
highlights.prioritiesfromconfig.new()in this PR. That belongs to the blocked v0.4.0 hard-removal branch.Acceptance Criteria
config.new().highlights.prioritiesstill normalizes to the fixed defaults198/199/200/201highlights.prioritiesis unchangedSuggested Verification