Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunInteractive ¶
func RunInteractive(allFiles, stagedFiles, unstagedFiles []parser.FileDiff, rendererOpts RendererOptions) error
Types ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer handles the display of diff output
func NewRenderer ¶
func NewRenderer(opts RendererOptions) *Renderer
NewRenderer creates a new renderer
type RendererOptions ¶
type RendererOptions struct {
UseColor bool
Unified bool
DiffStyle string
AddedTextColor string
DeletedTextColor string
}
RendererOptions describes configuration for the renderer visuals.
type Theme ¶
type Theme struct {
// Background colors
DeletedBg lipgloss.Color
AddedBg lipgloss.Color
UnchangedBg lipgloss.Color
UnchangedBgStripe lipgloss.Color // Alternating row color
InlineDeletedBg lipgloss.Color
InlineAddedBg lipgloss.Color
// Foreground colors
DeletedFg lipgloss.Color
AddedFg lipgloss.Color
UnchangedFg lipgloss.Color
InlineDeletedFg lipgloss.Color
InlineAddedFg lipgloss.Color
// Line number colors
LineNumDeleted lipgloss.Color
LineNumAdded lipgloss.Color
LineNumUnchanged lipgloss.Color
// Header colors
FileHeaderBg lipgloss.Color
FileHeaderFg lipgloss.Color
// Border colors
BorderColor lipgloss.Color
// Styles
DeletedLineStyle lipgloss.Style
AddedLineStyle lipgloss.Style
UnchangedLineStyle lipgloss.Style
UnchangedLineStyleAlt lipgloss.Style // Alternating style
InlineDeletedStyle lipgloss.Style
InlineAddedStyle lipgloss.Style
LineNumStyle lipgloss.Style
FileHeaderStyle lipgloss.Style
SeparatorStyle lipgloss.Style
UseLineBackground bool
}
Theme contains all color and style definitions
func NewTheme ¶
func NewTheme(opts ThemeOptions) *Theme
NewTheme creates a new theme with styles based on the provided options.
type ThemeOptions ¶
Click to show internal directories.
Click to hide internal directories.