Configuration
Configuration File
leaf reads configuration from ~/.config/leaf/config.toml (Linux/macOS) or %APPDATA%\leaf\config.toml (Windows).
On Linux/macOS, $XDG_CONFIG_HOME/leaf/config.toml is used if set.
Open it with:
leaf --config
Reset to defaults:
leaf --config reset
Options
# Default theme: arctic, forest, ocean, solarized-dark
# Can also be a path to a custom .toml theme file
theme = "ocean"
# theme = "./theme/my-theme.toml"
# Default editor for Ctrl+E
editor = "vim"
# Enable watch mode by default
watch = false
# Extra file extensions to treat as Markdown
extras = ["txt", "log"]
# Maximum content width in columns (default: terminal width)
# width = 80
All settings are optional. CLI flags always override config file values.
Precedence
- Command-line flags (highest priority)
LEAF_*environment variables- Config file (
config.toml) - Platform default
This applies uniformly to editor, theme, and width.
Environment Variables
| Variable | Description |
|---|---|
LEAF_EDITOR | Override editor selection |
LEAF_THEME | Override theme selection |
LEAF_WIDTH | Override content width |
XDG_CONFIG_HOME | Config directory (default: ~/.config) |