← All extensions

OpenTofu

v1.0.1 · by Caius Durling, Daniel Banck, Artem Zhurikhin, Tom Zaspel · added 3 November 2026

OpenTofu support.

LanguagesLanguage servers

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:

  1. A tofu-ls binary already available on your PATH
  2. A previously downloaded tofu-ls binary cached by the extension
  3. The latest compatible tofu-ls release 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:

Development

To develop this extension, see the Developing Extensions section of the Zed docs.