This is the official Terramate extension for Visual Studio Code.
If you are new to Terramate, this article provides an overview of the project and how it improve Terraform and OpenTofu workflows.
Install terramate-ls:
- Installation guide
- Or via Homebrew:
brew install terramate-io/tap/terramate
The extension automatically detects terramate-ls in your PATH.
Install the Terramate Extension for VSCode or search for Terramate in the VSCode Extensions Panel (Ctrl/Cmd+Shift+X).
Open any folder containing Terramate files. Files with .tm, .tm.hcl, or .tmgen extensions will automatically activate the extension with full syntax highlighting and language server features.
Full syntax highlighting for all Terramate language constructs:
- Core blocks:
terramate,stack,globals,generate_hcl,generate_file,assert,output,script,vendor,sharing_backend, and more - Pro blocks:
define bundle,define component,scaffolding
When terramate-ls is installed, you get:
- ✅ Real-time validation - Catch errors as you type
- ✅ Smart autocomplete - Context-aware suggestions
- ✅ Hover documentation - Inline help
- ✅ Go to definition - Navigate your code
- ✅ Diagnostics - Error and warning reporting
Bundle/Component Support: Depends on your terramate-ls version. Language servers built from repositories with Pro features include full bundle and component validation.
| Setting | Default | Description |
|---|---|---|
terramate.languageServer.enabled |
true |
Enable/disable language server |
terramate.languageServer.binPath |
"" |
Custom path to terramate-ls |
terramate.languageServer.args |
["-mode=stdio"] |
Arguments for terramate-ls |
terramate.languageServer.trace.server |
"off" |
LSP trace level (off/messages/verbose) |
Default (Auto-detect)
{
// No configuration needed - finds terramate-ls in PATH automatically
}Custom Binary Path
{
"terramate.languageServer.binPath": "/custom/path/to/terramate-ls"
}Disable Language Server (Syntax highlighting only)
{
"terramate.languageServer.enabled": false
}Debug Language Server Issues
{
"terramate.languageServer.trace.server": "verbose"
}View logs in: View → Output → Select "Terramate"
If you have *.hcl files associated with another extension (e.g., Terraform), you can add Terramate-specific associations:
Settings → Text Editor → Files → Associations or in settings.json:
{
"files.associations": {
"*.tm.hcl": "terramate",
"*.tm": "terramate",
"*.tmgen": "terramate"
}
}-
Check if terramate-ls is installed:
which terramate-ls terramate-ls --version
-
Check VSCode Output panel:
- View → Output
- Select "Terramate" from dropdown
- Look for error messages
-
Try custom path:
{ "terramate.languageServer.binPath": "/full/path/to/terramate-ls" }
- Check the file is recognized as Terramate (bottom right of VSCode)
- Try reloading VSCode
- Check file extension is
.tmor.tm.hcl
To contribute to this project, please read:
- Terramate Contributing Guide
- CONTRIBUTING.md (extension-specific)
This project uses automated releases triggered by GitHub releases. Here's how to publish a new version:
Use npm scripts to bump the version and create a git commit:
# For bug fixes (0.0.5 → 0.0.6)
npm run version:patch
# For new features (0.0.5 → 0.1.0)
npm run version:minor
# For breaking changes (0.0.5 → 1.0.0)
npm run version:majorThis will:
- Update the version in
package.json - Create a git commit with message
chore: bump version to X.X.X - Create a git tag
vX.X.X
git push && git push --tags- Go to Releases
- Select the tag you just pushed (e.g.,
v0.0.6) - Set release title (e.g.,
v0.0.6orRelease 0.0.6) - Add release notes describing changes
- Click "Publish release"
Once the release is published, the Release Workflow automatically:
- ✅ Builds and compiles the extension
- ✅ Runs linting and tests
- ✅ Creates the VSIX package
- ✅ Uploads the VSIX to the GitHub release
- ✅ Publishes to VSCode Marketplace
- ✅ Publishes to Open VSX Registry
The entire process takes 2-3 minutes. You can monitor progress in the Actions tab.
Publishing requires these GitHub secrets to be configured (maintainers only):
VSCODE_ACCESS_TOKEN- Personal Access Token from Azure DevOps for VSCode MarketplaceOPEN_VSX_ACCESS_TOKEN- Access Token from Open VSX Registry
If tokens are not configured, the workflow will skip publishing but still create the VSIX package.
Apache 2.0 - See LICENSE for details.