Skip to content

Write .rf.hcl files with feedback as you edit. Rootform supplies diagnostics for invalid source, completion in context, hover information, go to definition and document formatting. Syntax highlighting, bracket matching and folding help you navigate a Dialect or Policy Pack.

Start editing

  1. Install Rootform and confirm rootform version works.
  2. Open Extensions, search for Rootform, and install the extension published by rootform-dev. Use VS Code 1.133 or later.
  3. Open a trusted workspace containing .rf.hcl files. Select the Rootform language mode if VS Code has not selected it automatically.

Rootform must be on VS Code's PATH. If it is installed elsewhere, set Rootform: Server Path in Settings, or use:

settings.json JSON
{
"rootform.server.path": "/absolute/path/to/rootform"
}

The extension uses your local executable; it does not bundle or download one. It starts it only in a trusted workspace.

Work on a Dialect or Policy Pack

Open a source root and use completion while writing declarations and expressions. Hover a symbol for its information; use Go to Definition to follow a reference and Format Document to format the file. Diagnostics update as you edit, including unsaved changes.

The editor uses the same Rootform parser, compiler and formatter as the CLI through rootform lsp. It validates source without planning infrastructure, running providers or downloading project content. Valid Policy source still needs to be linked and evaluated against a Form; the editor does not perform a Policy check.

Edit Rootform source explains source roots and the next authoring steps. Test and validate covers behavior and Policy semantics beyond editor diagnostics.

If language features do not start

Check that the workspace is trusted, .rf.hcl uses the Rootform language mode, and the configured executable supports rootform lsp. An absolute server path avoids differences between terminal and desktop application PATH. After changing or replacing the executable, run Rootform: Restart Language Server from the Command Palette.

Use the extension README for launch diagnostics and the LSP reference for the server contract.