# leaf configuration file # # Copy this file to your config directory: # Linux / macOS / Termux: ~/.config/leaf/config.toml # Windows: %APPDATA%\leaf\config.toml # # On Linux / macOS, $XDG_CONFIG_HOME/leaf/config.toml is used if set. # # All settings are optional. If a setting is missing or the file # does not exist, leaf uses its built-in defaults. # Command-line arguments always take priority over this file. # Color theme # Built-in themes: arctic, forest, ocean, solarized-dark # Or set this to a custom theme file path. # Relative paths are resolved from this config file's directory. # Priority: --theme flag > LEAF_THEME > this setting > ocean # Default: ocean theme = "ocean" # Custom theme example: # theme = "/path/to/custom-theme.toml" # # On Windows, use single quotes to avoid escaping backslashes: # theme = 'C:\path\to\custom-theme.toml' # # See gruvbox.toml in the repository for a complete example. # Default editor for Ctrl+E # Any editor name available in PATH: nano, vim, nvim, micro, # hx, emacs, code, subl, gedit, kate, mousepad, zed, etc. # # For paths with spaces, just write the path: # editor = 'C:\Program Files\Notepad++\notepad++.exe' # # For paths with spaces AND arguments, use inner quotes: # editor = '"C:\Program Files\Notepad++\notepad++.exe" --some-flag' # # Use {$line} to open the editor at the first visible source line at Ctrl+E: # editor = 'nano +{$line}' # editor = 'nvim +{$line} +"normal! zz"' # # Also, {$path} offers more customization options: # editor = 'code -g {$path}:{$line}' # # Priority: --editor flag > LEAF_EDITOR > this setting > nano (notepad on Windows) # editor = "nano" # Maximum content width (number of columns) # Limits how wide the rendered content can be. # Useful on wide terminals for better readability. # Priority: --width flag > LEAF_WIDTH > this setting > terminal width # Minimum: 20 # Default: terminal width (no limit) # width = 80 # Watch mode: automatically reload when the file changes # Only applies when opening a file (ignored for stdin) # Default: false watch = false # Extra file types shown in the file picker # Add other extensions to also show them (without the dot). # Code files (py, sh, css, html...) get syntax highlighting. # Text files (txt, csv, log...) are rendered as plain Markdown. # Default: [] (Markdown only) # extras = ["txt", "csv", "rs", "java", "json", "yaml"] # Width of the file picker (fuzzy + file browser) # Accepted formats: # "NN%": percent of terminal width, converted to cells (ceil) # "NNcells": absolute number of terminal cells # The final width is always capped by (terminal_width - 2) cells. # # Priority: LEAF_FILE_PICKER_WIDTH > this setting > default ("78cells") # Minimum: 78 cells. Applies to both formats. # Default: "78cells" # file-picker-width = "78cells" # Show line numbers inside fenced code blocks # Only affects code block gutters, the main document line numbers are independent. # Priority: LEAF_CODE_LINE_NUMBERS > this setting > default (true) # Accepted env values: 1 = true, 0 = false (other values ignored) # Default: true # code-line-numbers = true # Maximum tab title length (in characters) # Controls the tab title of the terminal: "leaf: ". # When the filename is long, it is truncated: "leaf: prefix...ext". # Priority: LEAF_TAB_TITLE_LENGTH > this setting > default (-1) # Minimum accepted: 20. Any other value falls back to no truncation. # Default: -1 (no truncation) # tab-title-length = -1 # Maximum number of recently opened files to keep in history # History is stored in "history.toml" next to this config file. # Maximum accepted: 50. Values above are clamped. # Default: 0 (disables history recording) # file-history-length = 0