Documentation
¶
Index ¶
- Variables
- func ErrorBox(err error, width int) string
- func ListThemes() []string
- func RenderFileList(files []git.FileStat, selectedIdx int) string
- func RenderFooter(showLineNumbers bool, fullContext bool, focusOnFileList bool, searchMode bool, ...) string
- func RenderSide(rows []parser.DiffRow, side Side, showLineNumbers bool, ...) string
- func SetTheme(name string)
- func ValidateTheme(name string) bool
- type SearchMatch
- type Side
- type Theme
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TitleStyle lipgloss.Style BorderStyle lipgloss.Style AddStyle lipgloss.Style DelStyle lipgloss.Style HeaderSeparatorStyle lipgloss.Style HeaderLineStyle lipgloss.Style ErrorBoxStyle lipgloss.Style // File list sidebar styles FileListStyle lipgloss.Style FileListStyleFocused lipgloss.Style FileListItemStyle lipgloss.Style SelectedFileStyle lipgloss.Style // Stats styles AdditionsStyle lipgloss.Style DeletionsStyle lipgloss.Style DeltaStyle lipgloss.Style StatusModifiedStyle lipgloss.Style StatusAddedStyle lipgloss.Style StatusDeletedStyle lipgloss.Style StatusUntrackedStyle lipgloss.Style // Border styles for focused/unfocused panes BorderStyleFocused lipgloss.Style BorderStyleUnfocused lipgloss.Style // Search match highlighting styles SearchMatchStyle lipgloss.Style SearchCurrentMatchStyle lipgloss.Style SearchInputStyle lipgloss.Style )
All styles use the current theme colors
Functions ¶
func RenderFileList ¶
RenderFileList generates the sidebar content showing all modified files.
func RenderFooter ¶
func RenderFooter(showLineNumbers bool, fullContext bool, focusOnFileList bool, searchMode bool, showUntracked bool, searchInfo string, termWidth int) string
RenderFooter renders the footer with keyboard shortcuts and feature states. searchInfo format: "Match X of Y" or empty string if no search
func RenderSide ¶
func RenderSide(rows []parser.DiffRow, side Side, showLineNumbers bool, searchMatches ...SearchMatch) string
RenderSide turns structured diff rows into a string suitable for a viewport. If searchMatches is provided, it highlights the matches in the output.
func ValidateTheme ¶
ValidateTheme checks if a theme name is valid
Types ¶
type SearchMatch ¶
SearchMatch represents a search match for highlighting We define it here to avoid circular imports
type Theme ¶
type Theme struct {
Name string
// Diff colors
AdditionBg string
AdditionFg string
DeletionBg string
DeletionFg string
ContextFg string
HeaderFg string
// UI colors
BorderColor string
FocusedBorderColor string
TitleFg string
// File list colors
ModifiedFg string
AddedFg string
DeletedFg string
// General
Background string
Foreground string
}
Theme defines colors for all UI elements
func HighContrastTheme ¶
func HighContrastTheme() Theme
HighContrastTheme - Maximum contrast for accessibility
Click to show internal directories.
Click to hide internal directories.