VladRassokhin / intellij-hcl

HCL language support for IntelliJ platform based IDEs
Apache License 2.0
244 stars 47 forks source link

String Interpolation missing in .hcl files #226

Closed apottere closed 5 years ago

apottere commented 5 years ago

Prerequisites

Installation details

IntelliJ IDEA 2019.2 EAP (Ultimate Edition) Build #IU-192.5118.30, built on June 13, 2019 HCL Plugin: 0.7.3 Terraform v0.12.1

Terraform Configuration Files

block {
  test = "${functioncall("")}"
}

Expected Behavior

String interpolations are hilighted in .hcl files

Actual Behavior

image

Steps to Reproduce

Use string interpolation anywhere in a .hcl file

Interpolation works if file is renamed to .tf: image

It looks like per #2 this is intentional behavior, however interpolations are part of the HCL spec: https://github.com/hashicorp/hcl2/blob/master/hcl/hclsyntax/spec.md#template-interpolations

It seems like interpolation should be added to strings in .hcl files, along with any relevant inspections.

VladRassokhin commented 5 years ago

Yep, that was done intentionally in times of HCL1, with HCL2 that seems no longer needed, will fix

VladRassokhin commented 5 years ago

Enabled interpolations for all hcl files. Will be available in next release.

apottere commented 5 years ago

Thanks!

apottere commented 5 years ago

Hey, just tested this out in the latest release (0.7.4). It looks like there's no longer a syntax error at the end of the line, but the hilighting and inspections are still missing: image

supersmile2009 commented 3 years ago

Hi @VladRassokhin! It doesn't seem to be working even on 0.7.10. Did something issue prevent this feature from finally getting into the release?