Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 3.61 KB

README.md

File metadata and controls

72 lines (53 loc) · 3.61 KB
Logo

Marketplace Version pypi package CI VSCode Extensions toml-test GitHub license

Tombi (鳶) is a toolkit for TOML; providing a formatter/linter and language server.

Differences from Taplo

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

Usage

Formatting

tombi format

Linting

tombi lint

Config file

The documentation site has not been built yet, but you can control the behavior with a configuration file called tombi.toml.

NOTE

TOML v1.1.0

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"

toml-test

We are monitoring the passing of all test cases of toml-test with CI.

toml-test

🚧 JSON Schema 🚧

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 supports v1.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.

Comment Formatting

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.