https://github.com/mitchellh/tree-sitter-hcl
A tree-sitter grammar for HCL (HashiCorp Configuration Language), used by projects such as Terraform.
https://github.com/mitchellh/tree-sitter-hcl
hcl tree-sitter
Last synced: 8 months ago
JSON representation
A tree-sitter grammar for HCL (HashiCorp Configuration Language), used by projects such as Terraform.
- Host: GitHub
- URL: https://github.com/mitchellh/tree-sitter-hcl
- Owner: mitchellh
- License: mit
- Created: 2021-06-22T00:26:21.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-06-20T12:52:01.000Z (about 4 years ago)
- Last Synced: 2025-02-06T13:13:21.974Z (over 1 year ago)
- Topics: hcl, tree-sitter
- Language: C
- Homepage:
- Size: 253 KB
- Stars: 76
- Watchers: 8
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tree-sitter-hcl
**Update: check out this more full-featured tree-sitter-hcl plugin here:**
https://github.com/MichaHoffmann/tree-sitter-hcl
[tree-sitter][] grammar for [HCL (HashiCorp Configuration Language)][hcl] files.
HCL is the configuration format used by projects such as Terraform, Vault,
Waypoint, Nomad, etc.
[hcl]: https://github.com/hashicorp/hcl
[tree-sitter]: https://github.com/tree-sitter/tree-sitter
## Status
**Important: This is not an officially supported HashiCorp project.**
I am one of the founders of HashiCorp, but I built this in my personal
free time and there are no dedicated resources (people or otherwise)
from the company on this project.
The grammar parses most HCL files I've thrown at it. It doesn't handle
interpolations yet (in strings or heredocs) and instead treats the full string
as just a string. This is the biggest feature missing at the moment. Regardless,
I am using this day to day for general HCL highlighting.
## Screenshot
The screenshot shows a Terraform example syntax highlighted.
