Documentation
¶
Overview ¶
Package static renders diffs to a terminal writer with ANSI colouring.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Cyber = themeFromPalette(theme.PaletteCyber) Matrix = themeFromPalette(theme.PaletteMatrix) Dracula = themeFromPalette(theme.PaletteDracula) Nord = themeFromPalette(theme.PaletteNord) )
Functions ¶
Types ¶
type Options ¶
type Options struct {
Theme Theme
Context int // lines of context per hunk (default 3)
Stat bool // print summary only, no diff body
NoStat bool // suppress the stat line entirely
NoColor bool
Quiet bool
}
Options configures static rendering.
type Theme ¶
type Theme struct {
Added lipgloss.Style
Removed lipgloss.Style
Modified lipgloss.Style // structured diffs: changed value
Unchanged lipgloss.Style
HunkHeader lipgloss.Style
FileHeader lipgloss.Style
LineNumber lipgloss.Style
StatAdded lipgloss.Style
StatRemoved lipgloss.Style
Banner lipgloss.Style
}
Theme holds lipgloss styles for static diff rendering.
func ResolveTheme ¶
ResolveTheme returns the named theme, defaulting to Cyber.
Click to show internal directories.
Click to hide internal directories.