Announcing the HCL Extension for Visual Studio Code 0.1
HashiCorp adopts the community-created HCL Extension for Visual Studio Code and adds HCL 2.0 support.
As a foundation of many of HashiCorp's products, the HashiCorp Configuration Language (HCL) and its support in various Integrated Development Environments (IDEs) is an integral part of the user experience of our tools. For some time we have supported a first-class experience of Terraform via our Visual Studio Code Extension and Terraform Language Server. Other products were previously supported by a community-maintained HCL Extension.
Today we announce that HashiCorp has transitioned the community HCL Extension to an officially supported project. This change allows us to provide a consistent editing experience for both Terraform users and users of other HCL-based products and continue delivering updates that accurately reflect HCL 2 and any changes to the language.
We would like to thank William Holroyd for creating the existing HCL Extension in 2016 and maintaining it over its 125,000-install lifespan.
» Introducing HCL v2 Support
HCL has evolved significantly over the past few years. HCL v2 was adopted by Terraform 0.12 in May 2019, Packer 1.5 in December 2019, and Nomad 1.0 in December 2020. Some of the most notable differences introduced with HCL v2 include first-class support for expressions and support for type constraints. The grammar used for highlighting in the new HCL Extension supports all these constructs.
» Getting Started
You can find the HCL Extension on the Visual Studio Marketplace. Click Install to launch VS Code and install the extension. The extension will then automatically highlight any files with a *.hcl file extension.
» Upgrading from wholroyd.HCL
To provide continuity to users, we worked with William on transferring the Marketplace entry under the HashiCorp namespace. This means that if you have previously installed the HCL Extension under William's namespace, you will automatically receive the HashiCorp Extension and continue receiving future updates from HashiCorp. In short, you don't need to uninstall one and install another extension.
» New Syntax Repository
VS Code uses TextMate grammars to power its syntax highlighting features. TextMate grammars have been adopted by many popular editors. This allows extension authors to write a single TextMate grammar that works for multiple text editors.
The hashicorp/syntax repository is the new home for the TextMate grammars used by this new HCL Extension, as well as the Terraform and Sentinel extensions.If you find a piece of configuration that isn't highlighted how you'd expect and want to propose a fix, this is where you can submit issues or contributions.
Sign up for the latest HashiCorp news
More blog posts like this one
Fix the developers vs. security conflict by shifting further left
Resolve the friction between dev and security teams with platform-led workflows that make cloud security seamless and scalable.
HashiCorp at AWS re:Invent: Your blueprint to cloud success
If you’re attending AWS re:Invent in Las Vegas, Dec. 2 - Dec. 6th, visit us for breakout sessions, expert talks, and product demos to learn how to take a unified approach to Infrastructure and Security Lifecycle Management.
Speed up app delivery with automated cancellation of plan-only Terraform runs
Automatic cancellation of plan-only runs allows customers to easily cancel any unfinished runs for outdated commits to speed up application delivery.