Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Colors ¶
type Colors struct {
Accent string // active pane borders, dir names
Border string // inactive pane borders
Normal string // file entries, context lines
Muted string // divider lines, status bar
SelectedFg string // selected file text
SelectedBg string // selected file background
Annotation string // annotation text and markers
CursorFg string // diff cursor indicator foreground
CursorBg string // diff cursor line background
AddFg string // added line foreground
AddBg string // added line background
RemoveFg string // removed line foreground
RemoveBg string // removed line background
TreeBg string // file tree pane background
DiffBg string // diff pane background
StatusFg string // status bar foreground
StatusBg string // status bar background
}
Colors holds hex color values (#rrggbb) for TUI rendering.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the top-level bubbletea model for revdiff.
func NewModel ¶
func NewModel(renderer Renderer, store *annotation.Store, highlighter SyntaxHighlighter, cfg ModelConfig) Model
NewModel creates a new Model with the given renderer, store, highlighter and configuration.
func (Model) Store ¶
func (m Model) Store() *annotation.Store
Store returns the annotation store for reading results after quit.
type ModelConfig ¶
type ModelConfig struct {
Ref string
Staged bool
TreeWidthRatio int
TabWidth int // number of spaces per tab character
NoColors bool // disable all colors including syntax highlighting
NoStatusBar bool // hide the status bar
Colors Colors
}
ModelConfig holds configuration options for NewModel.
Click to show internal directories.
Click to hide internal directories.