afnanenayet / tree-sitter-hcl

A tree-sitter grammar for HCL (HashiCorp Configuration Language), used by projects such as Terraform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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) files. HCL is the configuration format used by projects such as Terraform, Vault, Waypoint, Nomad, etc.

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.

Screenshot

About

A tree-sitter grammar for HCL (HashiCorp Configuration Language), used by projects such as Terraform.

License:MIT License


Languages

Language:C 96.4%Language:JavaScript 1.9%Language:C++ 1.4%Language:Nix 0.2%Language:Scheme 0.1%Language:Python 0.1%