Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme: Correct supported list of extensions #420

Merged
merged 1 commit into from
Aug 14, 2020

Conversation

radeksimko
Copy link
Member

Looks like this was just a relic from the older version of the extension. Generally hcl represents generic HCL configuration, not something Terraform would ever load.

That said it's something we may consider supporting in the future either directly or via a separate extension and/or separate language server.

For now not supporting HCL in a Terraform extension is intentional.

Relatedly if any other Terraform extension supports HCL and treats it the same way as Terraform's HCL, it's probably inaccurate. Many extensions aren't currently aware of this distinction and that's something we also need to communicate going forward, as per hashicorp/terraform-ls#50 (comment)

@aeschright
Copy link
Contributor

This got caught in an in-between state: the syntax highlighting file will apply itself to .hcl files if the Terraform extension is already loaded. If we want to 100% ignore all .hcl then the file header in /syntaxes also needs to be updated.

@paultyng
Copy link
Contributor

If you see #225, we mark Terraform content as hcl in Markdown for our docs, which complicates this, so we should offer basic HCL syntax highlighting here (and inject to markdown) where we can.

@radeksimko
Copy link
Member Author

radeksimko commented Jun 26, 2020

I just thought it's easier not to support it initially, because if we are going to highlight hcl it should use dedicated rules which would be subset of Terraform syntax IMO and as such it e.g. probably shouldn't highlight/recognise references in any way.

I suspect people won't download Terraform extension to get highlighting for generic HCL, but also they might have Terragrunt configs alongside Terraform, which are generic HCL and should be highlighted as such.

I understand the pragmatic argument that most of our docs use hcl identifier in markdown and all of these docs do contain Terraform, but also they use wrong identifier, so we will need to address that tech debt sooner or later.

I guess it comes down to comparing the cost of:

  1. highlighting Terragrunt configs (and any other generic HCL) incorrectly, vs
  2. not highlighting existing examples in our docs, vs
  3. building a generic HCL highlighting rules

It seems there's perception that (1) has the lowest cost, which I'm happy to respect, but I wanted to make sure we are all making an informed decision 😉

@FernandoMiguel
Copy link

i load outputs of terraform runs into vscode to read them, and those are HCL highlighted

@FernandoMiguel
Copy link

and then there's this
https://github.com/wholroyd/vscode-hcl
which is so old, i assume doesnt support HCL2

@RootMePLS
Copy link

RootMePLS commented Jul 21, 2020

@aeschright is something blocks from merging?

@aeschright aeschright merged commit d0cf0f9 into master Aug 14, 2020
@aeschright aeschright deleted the d-hcl-syntax-highlighting branch August 14, 2020 00:20
@ghost
Copy link

ghost commented Sep 13, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Sep 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants