Skip to main content

Module diff_styles

Module diff_styles 

Source
Expand description

Unified diff styles for TUI rendering

Re-exports diff theme from vtcode-commons and provides ratatui-specific style helpers for diff rendering.

Structs§

DiffColorPalette
Diff color palette for consistent git diff styling Uses standard ANSI colors without bold for accessibility and consistency.
DiffRenderStyleContext
Snapshot of diff styling inputs that can be reused while rendering.

Enums§

DiffColorLevel
Terminal color capability level for palette selection.
DiffLineType
Diff line type for style selection.
DiffTheme
Terminal background theme for diff rendering.

Functions§

diff_add_bg
Get background color for addition lines based on theme and color level.
diff_add_fg
Foreground color for an addition marker or fallback body.
diff_add_word_bg
Stronger addition-chip background for word-level (intra-line) highlights.
diff_del_bg
Get background color for deletion lines based on theme and color level.
diff_del_fg
Foreground color for a deletion marker or fallback body.
diff_del_word_bg
Stronger deletion-chip background for word-level (intra-line) highlights.
diff_gutter_bg_add_light
Get gutter background color for addition lines in light theme.
diff_gutter_bg_del_light
Get gutter background color for deletion lines in light theme.
diff_gutter_fg
Foreground color for line-number gutters and separators.
diff_gutter_fg_light
Legacy light-theme gutter foreground retained for compatibility.
diff_hunk_bg
Get background color for hunk header (@@ -old +new @@) lines.