From tofu-ls
OpenTofu Language Server (tofu-ls) provides code intelligence for OpenTofu/Terraform configuration files — diagnostics, completion, go-to-definition, and hover info for .tf, .tofu, and .tfvars files.
Ships in tofu-ls. Installing the plugin adds it to Claude Code.
This LSP server requires tofu-ls to be installed on your system. Make sure it's available in your PATH before enabling.
Copy this JSON into your .lsp.json to enable this server
Add to your .lsp.json or plugin.json:
{
"lspServers": {
"opentofu": {
"command": "tofu-ls",
"extensionToLanguage": {
".tf": "opentofu",
".tofu": "opentofu",
".tfvars": "opentofu-vars"
},
"args": [
"serve"
]
}
}
}File extensions mapped to language identifiers
Server configuration and transport parameters
tofu-lsstdioCommand-line arguments passed to the server process
Initialization options and workspace settings
Initialization Options:
{}Settings:
{}opentofu, terraform, infrastructure-as-code, lsp, code-intelligence
7-day visitors to each server page
npx claudepluginhub piebald-ai/claude-code-lsps --plugin tofu-ls