Expand description
Runtime formatter configuration and config-file loading. Runtime formatter configuration.
Config is the fully resolved in-memory configuration used by the
formatter. It is built from defaults, user config files
(.cmakefmt.yaml, .cmakefmt.yml, or .cmakefmt.toml), and CLI
overrides.
Re-exports§
pub use file::default_config_template;pub use file::default_config_template_for;pub use file::generate_json_schema;pub use file::render_effective_config;pub use file::DumpConfigFormat;
Modules§
- file
- Config-file loading and starter template generation.
Structs§
- Command
Config - A resolved config for formatting a specific command, with per-command overrides already applied.
- Config
- Full formatter configuration.
- Experimental
- Experimental formatting options gated behind
--previewor the[experimental]config section. All options default tofalse. - PerCommand
Config - Per-command overrides. All fields are optional — only specified fields override the global config for that command.
Enums§
- Case
Style - How to normalise command/keyword casing.
- Dangle
Align - How to align the dangling closing paren.
- Fractional
TabPolicy - How to handle fractional tab indentation when
Config::use_tabcharsistrue. - Line
Ending - Output line-ending style.
Functions§
- convert_
legacy_ config_ files - Convert one or more legacy
cmake-formatconfig files intocmakefmtconfig text in the requested output format.