Home Explore Blog CI



zed

1st chunk of `docs/src/languages/toml.md`
ac51b69a7cb76407429281cda88f976ad61874c57bdbb0160000000100000400
# TOML

TOML support is available through the [TOML extension](https://github.com/zed-industries/zed/tree/main/extensions/toml).

- Tree-sitter: [tree-sitter/tree-sitter-toml](https://github.com/tree-sitter/tree-sitter-toml)
- Language Server: [tamasfe/taplo](https://github.com/tamasfe/taplo)

## Configuration

You can control the behavior of the Taplo TOML language server by adding a `.taplo.toml` file to the root of your project. See the [Taplo Configuration File](https://taplo.tamasfe.dev/configuration/file.html#configuration-file) and [Taplo Formatter Options](https://taplo.tamasfe.dev/configuration/formatter-options.html) documentation for more.

```toml
# .taplo.toml
[formatting]
align_comments = false
reorder_keys = true

include = ["Cargo.toml", "some_directory/**/*.toml"]
# exclude = ["vendor/**/*.toml"]
```

Note: The taplo language server will not automatically pickup changes to `.taplo.toml`. You must manually trigger {#action editor::RestartLanguageServer} or reload Zed for it to pickup changes.

Title: TOML Support in Zed
Summary
Zed supports TOML files through the TOML extension, utilizing tree-sitter for parsing and Taplo as the language server. Taplo's behavior can be configured using a `.taplo.toml` file in the project root, allowing customization of formatting and file inclusion/exclusion. Changes to `.taplo.toml` require restarting the language server or reloading Zed to take effect.