TOML
TOML 支持通过 TOML 扩展提供。
- Tree-sitter: tree-sitter/tree-sitter-toml
- 语言服务器: tamasfe/taplo
配置
您可以通过在项目根目录中添加一个 .taplo.toml
文件来控制 Taplo TOML 语言服务器的行为。 有关更多信息,请参阅 Taplo 配置文件 和 Taplo 格式化选项 文档。
# .taplo.toml
[formatting]
align_comments = false
reorder_keys = true
include = ["Cargo.toml", "some_directory/**/*.toml"]
# exclude = ["vendor/**/*.toml"]
注意:taplo 语言服务器不会自动获取对 .taplo.toml
的更改。 您必须手动触发 editor: restart language server
或重新加载 Zed 才能使其获取更改。