Documentation
¶
Overview ¶
Package settings is the Settings port: user settings whose source of truth is the config file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultKeys ¶
DefaultKeys are the hotkeys before any are rebound.
func ValidBinding ¶
ValidBinding reports whether binding is a well-formed key sequence.
Types ¶
type Diff ¶
type Diff struct {
// CollapseThreshold is the changed-line count above which a file's diff
// starts collapsed.
CollapseThreshold int `toml:"collapse_threshold"`
// ExpandLines is how many unchanged lines each click on a gap between
// changes reveals.
ExpandLines int `toml:"expand_lines"`
}
Diff holds settings for rendering diffs.
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is an in-memory Store for tests.
type Settings ¶
type Settings struct {
Port int `toml:"port"`
Theme string `toml:"theme"`
ViewMode ViewMode `toml:"view_mode"`
Diff Diff `toml:"diff"`
// Keys binds actions to key sequences: keys separated by spaces, each
// optionally with modifiers, e.g. "ctrl+k" or "] c".
Keys map[string]string `toml:"keys"`
}
Settings are the user's settings.
func Defaults ¶
func Defaults() Settings
Defaults returns the settings used for anything the config file leaves unset.
func (Settings) WithKeyDefaults ¶
WithKeyDefaults fills in any action Keys leaves unbound.
Click to show internal directories.
Click to hide internal directories.