-
Name Previous Value Current Value Priority
Normal
Minor
| Type |
Enhancement
|
| Priority |
Minor
|
| Assignee | |
| Labels |
No labels
|
Issue Votes (0)
| Name | Previous Value | Current Value |
|---|---|---|
Priority | Normal | Minor |
| Type |
Enhancement
|
| Priority |
Minor
|
| Assignee | |
| Labels |
No labels
|
Add syntax highlighting support for Terraform / HCL files.
Currently
.tf,.tfvarsand.hclfiles are not mapped to any highlighter mode, so they always render as plain text in blob and diff views. Highlighting is selected purely from the file extension, and since these extensions are absent from the bundled mode table, there is no way to get colors for Terraform files.Proposed solution
Register an HCL/Terraform mode in the highlighter mode table and map the following extensions to it:
.tf.tfvars.hclPreferably also support
.tf.json/.tfvars.json(Terraform's JSON variants), which can reuse the existing JSON mode.Expected behavior
Terraform files are displayed with HCL-aware highlighting — comments (
#,//,/* */), strings and heredocs, numeric literals, block types and keywords (resource,variable,module,provider,locals,data,output,terraform, ...), and interpolation sequences such as${...}inside strings.