Best TOML
Lightweight TOML syntax highlighting for Visual Studio Code — for pyproject.toml, Cargo.toml, uv, Poetry, Ruff and any other TOML configuration.
No language server, no dependencies: just a grammar and sensible editor defaults.
Features
- Highlighting for:
- Tables (
[table]) and arrays of tables ([[table]])
- Keys: bare, dotted (
a.b) and quoted ("__init__.py")
- Strings: basic, literal and multi-line (
"""…""", '''…''')
- Numbers: integers, floats, hex, octal, binary,
inf, nan
- Booleans
- Dates and times: offset/local date-times, local dates and local times
- Comments (
#), including trailing comments
- Comment toggling with
Ctrl+/
- Auto-closing brackets and quotes
Not (yet) covered: highlighting of keys inside inline tables ({ x = 1 }) and validation — this extension only colors, it does not check your TOML.
Installation
Install Best TOML from the Visual Studio Marketplace, or in VS Code:
- Press
Ctrl+Shift+X to open the Extensions panel
- Search for Best TOML and click Install
To install manually, download the .vsix from the GitHub releases and choose Install from VSIX… in the ⋯ menu of the Extensions panel.
Development
npm install
npm test # grammar snapshot test against tests/sample.toml
After an intended grammar change, update the snapshot with npx vscode-tmgrammar-snap -u "tests/*.toml" and review the diff.
License
MIT