TomlSmith implements the published TOML 1.0.0 and TOML 1.1.0 specifications as separate modes. The selected version affects parsing, diagnostics, decoded values, and formatter safety checks.
| Surface | Default |
|---|---|
Rust Document::parse and FormatOptions::default |
TOML 1.1 |
Native CLI and @tomlsmith/cli |
TOML 1.1 |
| Browser playground after a new or reset session | TOML 1.1 |
tomlsmith-lsp without client configuration |
TOML 1.0 |
| TomlSmith for VS Code | TOML 1.0 |
The library, CLI, and playground use 1.1 for new standalone documents. Editor surfaces use 1.0 as a compatibility default because many ecosystem consumers still accept only 1.0. TomlSmith does not infer the language version from a filename.
Document::parse_as and set FormatOptions::target_version in reusable
Rust integrations.--toml-version 1.0 or --toml-version 1.1 to the CLI.tomlVersion in LSP initialization options or configuration updates.tomlsmith.toml.version in VS Code.Results across product surfaces are comparable only when the source, TOML version, and relevant options match. Formatting against a version other than the document's parse version performs an additional safety validation and can be refused.