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

Remove the configuration directory entirely:

leaf --config remove

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. Supports {$path} and {$line} placeholders.
editor = "nano"
# editor = 'nvim +{$line} +"normal! zz"'

# Enable watch mode by default
watch = false

# Maximum content width in columns (min: 20, default: terminal width)
width = 80

# Extra file extensions to show in the picker
extras = ["txt", "rs"]

# File picker width (percentage or absolute column count)
file-picker-width = "75%"

# Show line numbers inside fenced code blocks
code-line-numbers = true

# Terminal tab title truncation (min: 20, -1 = no truncation)
tab-title-length = -1

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)