Skip to content

Configuration Options


Configuration File Format

The configuration file uses TOML format with the filename yaoxiang.toml.

toml
[fmt]
# Line width limit (default 120)
line_width = 120

# Indent width (default 4)
indent_width = 4

# Use tab indentation (default false)
use_tabs = false

# Use single quotes (default false)
single_quote = false

# Sort import statements (default true)
sort_imports = true

Configuration Priority

Configuration priority chain (from highest to lowest):

  1. CLI Arguments — Command line arguments have the highest priority
  2. Project-level Configurationyaoxiang.toml in the current directory
  3. User-level Configuration~/.config/yaoxiang/config.toml
  4. Default Values — Built-in default values

Default Values

OptionDefaultDescription
line_width120Maximum line width
indent_width4Indent space count
use_tabsfalseWhether to use tabs
single_quotefalseWhether to use single quotes
sort_importstrueWhether to sort imports