Skip to main content

Crate sql_dialect_fmt_config

Crate sql_dialect_fmt_config 

Source
Expand description

sql-dialect-fmt.toml configuration files.

Shared by the CLI and the language server so both discover and apply project configuration the same way. A config file maps onto the formatter’s FormatOptions plus the CLI-only exclude file-discovery knob. Every key is optional, so a file may set only the knobs it cares about. Discovery walks up the directory tree from a start point (an input file’s parent, or the current working directory) and uses the nearest sql-dialect-fmt.toml — the first one found on the way up — mirroring how rustfmt, prettier, and friends scope project configuration. Explicit overrides (CLI flags, or LSP editor settings) always win over formatter options from the file.

Structs§

Config
A parsed sql-dialect-fmt.toml. Every field is optional; absent fields fall back to the formatter defaults (or to a CLI flag, which is layered on top afterwards).

Constants§

CONFIG_FILE_NAME
The file name the CLI looks for when walking up directories.

Functions§

discover
Find the nearest sql-dialect-fmt.toml at or above start, returning its path (not its contents).
parse_dialect
parse_keyword_case
parse_line_ending