config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig() (*Config, []ConfigError)

ParseConfig reads and parses all configuration files

Types

type Config

type Config struct {
	Workspace   []WorkspaceConfig `toml:"workspace"`
	SearchDepth int               `toml:"search_depth"` // Default: 1, 0 = unlimited
	UseZoxide   *bool             `toml:"use_zoxide"`   // Default: true, pointer to distinguish unset from false
}

Config represents the application configuration

func (*Config) GetSearchDepth added in v1.0.0

func (c *Config) GetSearchDepth(cliDepth int) int

GetSearchDepth returns the search depth, with a minimum of 1

func (*Config) GetUseZoxide added in v1.0.0

func (c *Config) GetUseZoxide() bool

GetUseZoxide safely returns the UseZoxide value, defaulting to true if nil

type ConfigError added in v0.2.3

type ConfigError struct {
	File  string
	Error error
}

ConfigError represents an error that occurred while processing a specific config file

type WorkspaceConfig

type WorkspaceConfig struct {
	Directory string   `toml:"directory"`
	Name      string   `toml:"name"`
	Windows   []string `toml:"windows"`
}

WorkspaceConfig represents a single workspace configuration

Jump to

Keyboard shortcuts

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