Documentation
¶
Overview ¶
Package config loads Critty configuration from the XDG config directory (global) and the project root (.critty.toml), mirroring crit's two-level merge semantics for the subset of keys Critty supports.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProjectPath ¶
ProjectPath returns the project config file path under root.
Types ¶
type Config ¶
type Config struct {
History history.Policy `json:"history"`
Output string `json:"output,omitempty"`
Author string `json:"author,omitempty"`
Split bool `json:"split,omitempty"`
IgnorePatterns []string `json:"ignore_patterns,omitempty"`
Launchers []string `json:"launchers,omitempty"`
TextconvDrivers []string `json:"textconv_drivers,omitempty"`
Quiet bool `json:"quiet,omitempty"`
CleanupOnApprove bool `json:"cleanup_on_approve,omitempty"`
DisableStats bool `json:"disable_stats,omitempty"`
Prompts map[string]string `json:"prompts,omitempty"`
// ProjectRoot is the directory the project-level config was resolved
// against (git top level or cwd). Not part of the file format.
ProjectRoot string `json:"-"`
}
Config is the resolved (merged) configuration.
func Load ¶
Load merges global and project configuration. projectRoot may be empty to skip the project level. Missing files are not errors.
func LoadCurrent ¶
LoadCurrent loads configuration for the current directory, using the git top-level directory as the project root when inside a repository.
Click to show internal directories.
Click to hide internal directories.