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

  1. Command-line flags (highest priority)
  2. LEAF_* environment variables
  3. Config file (config.toml)
  4. Platform default

This applies uniformly to editor, theme, and width.

Environment Variables

VariableDescription
LEAF_EDITOROverride editor selection
LEAF_THEMEOverride theme selection
LEAF_WIDTHOverride content width
XDG_CONFIG_HOMEConfig directory (default: ~/.config)