The HashiCorp HCL Extension for Visual Studio Code (VS Code) adds syntax highlighting for HCL files.
- Install the extension from the VS Code Marketplace
- Open your desired workspace and/or the root folder containing your HCL files.
This extension provides HCL syntax highlighting for files that use .hcl
as the file extension, for example:
The HashiCorp HCL Extension is a grammar only extension targeted to provide HCL syntax highlighting for files not already accounted for by a more specific product-focused extension. For example, Terraform syntax highlighting is already provided by the official HashiCorp Terraform Extension for VS Code.
Current Terraform users can install the HCL extension alongside the Terraform Extension and find that they can use HCL files without conflict. Users can also install the HCL Extension separately from the Terraform Extension if they only want HCL support.
Read more about HCL at https://github.com/hashicorp/hcl.
We use telemetry to collect data about opened file types which are implied from file names (such as terraform
for *.tf
or packer
for *.pkr.hcl
). This helps us better understand usage and make better informed product decisions. You can configure VS Code to send all telemetry, or turn it off entirely by configuring "telemetry.telemetryLevel"
to your desired value (e.g. "off"
or "all"
). You can also monitor what's being sent in your logs.
- We thank William Holroyd for creation and past maintenance of
wholroyd.HCL
VS Code extension and for agreeing to the extension namespace transfer to make the transition conflict-less and easy for existing users