OpenTofu
OpenTofu support.
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for OpenTofu. The extension's id is opentofu.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
Zed OpenTofu
An OpenTofu extension for Zed. Forked and adapted from the official Terraform extension.
Installation and language server resolution
The extension resolves tofu-ls in this order:
- A
tofu-lsbinary already available on yourPATH - A previously downloaded
tofu-lsbinary cached by the extension - The latest compatible
tofu-lsrelease from GitHub
This means the extension now works offline after tofu-ls has been installed once, either manually on your PATH or by letting Zed download it while online.
A first-time install still requires internet access unless you already have tofu-ls installed yourself.
File association conflicts
In order to automatically use the OpenTofu extension and language server when editing .tf, .tofu, and .tfvars files, either uninstall the Terraform extension or add this to your settings.json:
"file_types": {
"OpenTofu": ["tf", "tofu"],
"OpenTofu Vars": ["tfvars"]
},
Configuration
The extension forwards Zed LSP settings to tofu-ls under lsp.tofu-ls.settings.
Example:
"lsp": {
"tofu-ls": {
"settings": {
"tofu": {
"path": "/usr/local/bin/tofu",
"timeout": "30s"
},
"indexing": {
"ignoreDirectoryNames": ["vendor"]
}
}
}
},
For the full list of supported tofu-ls settings, see the upstream docs:
- OpenTofu language server usage
- OpenTofu language server settings
- OpenTofu language server installation
Development
To develop this extension, see the Developing Extensions section of the Zed docs.