hashicorp / hashicorp/syntax

Create an accurate Terraform & HCL grammar for PrismJS

Open
#39 0 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
HCL
Stars
31
Forks
12
Avg merge
7m
Merged PRs (30d)
1

Description

## Background

HCL and Terraform languages evolve over time and the existing community-maintained PrismJS grammar doesn't accurately capture the state of these languages or relationship between HCL and Terraform.

In particular they seem to be treated as the same language, where any HCL config (such as Packer) highlights Terraform keywords:
https://github.com/PrismJS/prism/blob/c2f6a64426f44497a675cb32dccb079b3eff1609/components/prism-hcl.js

## Proposal

- [ ] Publish a PrismJS grammar for HCL, based on existing TextMate grammar
- [ ] Publish a PrismJS grammar for Terraform, based on existing TextMate grammar
- [ ] **(Unknown)** Find out how existing websites can switch to that and/or whether we can get `PrismJS/prism` to consume our grammars
- [ ] [Terraform](https://www.terraform.io/) - e.g. https://www.terraform.io/language
- [ ] [Packer](https://www.packer.io/) - e.g. https://www.packer.io/docs/templates/hcl_templates
- [ ] [Nomad](https://www.nomadproject.io/) - e.g. https://www.nomadproject.io/docs/configuration
- [ ] [Waypoint](https://www.waypointproject.io/) - e.g. https://www.waypointproject.io/docs/waypoint-hcl#template-waypoint-hcl
- [ ] [Consul](https://www.consul.io/) - e.g. https://www.consul.io/docs/agent/config/config-files
- [ ] [Vault](https://www.vaultproject.io/) - e.g. https://www.vaultproject.io/docs/configuration
- [ ] [Boundary](https://www.boundaryproject.io/) - e.g. https://www.boundaryproject.io/docs/configuration

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.