1---
2title: OpenTofu
3description: "Configure OpenTofu language support in Zed, including language servers, formatting, and debugging."
4---
5
6# OpenTofu
7
8OpenTofu support is available through the [OpenTofu extension](https://github.com/ashpool37/zed-extension-opentofu).
9
10- Tree-sitter: [MichaHoffmann/tree-sitter-hcl](https://github.com/MichaHoffmann/tree-sitter-hcl)
11- Language Server: [opentofu/tofu-ls](https://github.com/opentofu/tofu-ls)
12
13## Configuration
14
15To automatically use the OpenTofu extension and language server when editing `.tf` and `.tfvars` files,
16either uninstall the Terraform extension or add this to your settings.json:
17
18```json
19"file_types": {
20 "OpenTofu": ["tf"],
21 "OpenTofu Vars": ["tfvars"]
22},
23```
24
25See the [full list of server settings here](https://github.com/opentofu/tofu-ls/blob/main/docs/SETTINGS.md).