Write .rf.hcl in Zed with Rootform diagnostics, completion, hover,
go to definition and formatting. Syntax highlighting, bracket matching,
indentation and folding keep Dialects and Policy Packs readable.
- Install Rootform and confirm
rootform versionworks. - Open Extensions, search for Rootform, and install it.
- Open a
.rf.hclfile.
The extension finds rootform on the workspace PATH and starts the language
server. It uses your local executable; it does not bundle or download one.
If Rootform is installed elsewhere, set both the path and arguments in Zed's settings:
{ "lsp": { "rootform": { "binary": { "path": "/absolute/path/to/rootform", "arguments": ["lsp"] } } }}Keep arguments: ["lsp"] with a path override so Zed starts the server
rather than the default CLI command.
Use completion while writing declarations and expressions, hover to inspect symbols, and go to definition to follow their references. Format the document with Zed's formatting command. Diagnostics update as you edit, including unsaved changes.
The editor uses the same Rootform parser, compiler and formatter as the CLI
through rootform lsp. Source validation runs without Terraform, OpenTofu,
providers or project content downloads. A Policy still needs a Form for
semantic validation and evaluation; editor diagnostics are not a Policy verdict.
Edit Rootform source explains source roots and the authoring workflow. Continue with Test and validate to prove behavior against evidence.
Check the executable path and the lsp argument together. An absolute path
avoids differences between a terminal and the workspace PATH. After fixing
a launch error or replacing Rootform, run editor: restart language server.
Use the extension README for launch settings and the LSP reference for the server contract.