config

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Theme name: "dark" (default), "light", or path to custom theme.
	Theme string `mapstructure:"theme"`
	// Editor to use for commit messages (falls back to $EDITOR).
	Editor string `mapstructure:"editor"`
	// MaxLogEntries is the default number of log entries to load.
	MaxLogEntries int `mapstructure:"max_log_entries"`
	// ConfirmDestructive prompts before force push, discard, etc.
	ConfirmDestructive bool `mapstructure:"confirm_destructive"`
	// DiffContextLines is the number of context lines in diffs.
	DiffContextLines int `mapstructure:"diff_context_lines"`
	// SideBySideDiff enables side-by-side diff mode by default.
	SideBySideDiff bool `mapstructure:"side_by_side_diff"`
}

Config holds the resolved application configuration.

func Load

func Load() (*Config, error)

Load reads configuration from ~/.config/zgv/config.yaml (or TOML/JSON).

type KeyBindings

type KeyBindings struct {
	Quit           string
	Help           string
	Tab            string
	ShiftTab       string
	Up             string
	Down           string
	Enter          string
	Space          string
	Stage          string
	StageAll       string
	Unstage        string
	UnstageAll     string
	Discard        string
	Commit         string
	AmendCommit    string
	Push           string
	Pull           string
	Fetch          string
	Refresh        string
	Search         string
	CopyHash       string
	OpenInEditor   string
	ToggleSideDiff string
}

KeyBindings defines the mapping of actions to keys. Kept separate so it can later be made configurable via config file.

func DefaultKeyBindings

func DefaultKeyBindings() KeyBindings

DefaultKeyBindings returns the default key bindings.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL