Tombi (鳶) is a toolkit for TOML; providing a formatter/linter and language server.
Taplo is already famous as a TOML Language Server. However, I rewrote a new Language Server for the following purposes.
- Support for TOML v1.1.0 (preview)
- Formatter inspired by Python's Black (Support for magic trailing comma)
- A formatter with stable behavior
tombi format
tombi lint
The documentation site has not been built yet, but you can control the behavior with a configuration file called tombi.toml.
TOML v1.1.0 has not been released.
The formatter of Tombi will show its true power in v1.1.0-preview
, but be careful.
Many existing systems (Cargo.toml, pyproject.toml) are v1.0.0
, and the default TOML version of Tombi is also v1.0.0
.
Important
Tombi currently provides v1.0.0
(default) and v1.1.0-preview
, but v1.1.0
is not available yet.
If you want to use v1.1.0-preview
, write as follows in tombi.toml
.
toml-version = "1.1.0-preview"
We are monitoring the passing of all test cases of toml-test with CI.
TOML itself may add schema specifications, but like Taplo, Tombi is also trying to add validation functions to the linter that support JSON Schema.
Currently, we are considering adding special information called x-tombi-*
to JSON Schema.
x-tombi-toml-version
: Required to automatically determine which system supportsv1.1.0
(implemented)x-tombi-table-key-order-by
: For automatically sorting tables like[dependencies]
(not implemented)
We need to request additional modifications to the JSON Schema Store, but Tombi has not yet gained share, so it will be much later.
Tombi is designed to automatically sort elements of Table
/ Array Of Tables
(sort features not implemented yet).
When the documentation site is published, a page will be created to explain the mechanism of comments treatment.