Documentation
¶
Overview ¶
Package config loads application and repository configuration from YAML.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDeltaArgsForTheme ¶ added in v1.8.0
DefaultDeltaArgsForTheme returns the default delta arguments for a given theme.
func NormalizeThemeName ¶ added in v1.8.0
NormalizeThemeName returns the canonical theme name if it is supported.
func SyntaxThemeForUITheme ¶ added in v1.6.0
SyntaxThemeForUITheme returns the default delta syntax theme for a UI theme.
Types ¶
type AppConfig ¶
type AppConfig struct {
WorktreeDir string
InitCommands []string
TerminateCommands []string
SortMode string // Sort mode: "path", "active" (commit date), "switched" (last accessed)
AutoFetchPRs bool
SearchAutoSelect bool // Start with filter focused and select first match on Enter.
MaxUntrackedDiffs int
MaxDiffChars int
DeltaArgs []string
DeltaArgsSet bool `yaml:"-"`
DeltaPath string
TrustMode string
DebugLog string
Pager string
Editor string
CustomCommands map[string]*CustomCommand
BranchNameScript string // Script to generate branch name suggestions from diff
Theme string // Theme name: see AvailableThemes in internal/theme
MergeMethod string // Merge method for absorb: "rebase" or "merge" (default: "rebase")
FuzzyFinderInput bool // Enable fuzzy finder for input suggestions (default: false)
ShowIcons bool // Render Nerd Font icons in file trees and PR views (default: true)
}
AppConfig defines the global lazyworktree configuration options.
func DefaultConfig ¶
func DefaultConfig() *AppConfig
DefaultConfig returns the default configuration values.
func LoadConfig ¶
LoadConfig reads the application configuration from a YAML file.
type CustomCommand ¶ added in v1.1.0
type CustomCommand struct {
Command string
Description string
ShowHelp bool
Wait bool
ShowOutput bool
Tmux *TmuxCommand
Zellij *TmuxCommand
}
CustomCommand represents a user-defined command binding.
type RepoConfig ¶
RepoConfig represents repository-scoped commands from .wt
func LoadRepoConfig ¶
func LoadRepoConfig(repoPath string) (*RepoConfig, string, error)
LoadRepoConfig loads repository-specific commands from .wt in repoPath
type TmuxCommand ¶ added in v1.7.0
type TmuxCommand struct {
SessionName string
Attach bool
OnExists string
Windows []TmuxWindow
}
TmuxCommand represents a configured tmux session layout.
type TmuxWindow ¶ added in v1.7.0
TmuxWindow represents a tmux window configuration.