Home Explore Blog CI



zed

docs/src/languages/terraform.md
954f4d78eca71a5ed6cb1b4232ed3b66b784a1137790b052000000030000035f
# Terraform

Terraform support is available through the [Terraform extension](https://github.com/zed-extensions/terraform).

- Tree-sitter: [MichaHoffmann/tree-sitter-hcl](https://github.com/MichaHoffmann/tree-sitter-hcl)
- Language Server: [hashicorp/terraform-ls](https://github.com/hashicorp/terraform-ls)

## Configuration

<!--
TBD: Add example using `rootModulePaths` to match upstream example https://github.com/hashicorp/terraform-ls/blob/main/docs/SETTINGS.md#vs-code
-->

The Terraform language server can be configured in your `settings.json`, e.g.:

```json
{
  "lsp": {
    "terraform-ls": {
      "initialization_options": {
        "experimentalFeatures": {
          "prefillRequiredFields": true
        }
      }
    }
  }
}
```

See the [full list of server settings here](https://github.com/hashicorp/terraform-ls/blob/main/docs/SETTINGS.md).

Chunks
8e36192d (1st chunk of `docs/src/languages/terraform.md`)
Title: Terraform Support and Configuration in Zed
Summary
Zed supports Terraform through the Terraform extension, utilizing tree-sitter-hcl and the Terraform language server. The language server can be configured in the `settings.json` file, allowing customization of features like prefilling required fields. A link to the full list of server settings is provided.