hashicorp / vscode-hcl

HCL (HashiCorp Configuration Language) Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=HashiCorp.HCL
Mozilla Public License 2.0
44 stars 9 forks source link

fix(language-configuration): use # as .hcl file line comment #279

Closed fabianopimentel closed 8 months ago

fabianopimentel commented 8 months ago

Doc: Terraform language supports three different syntaxes for comments. The # single-line comment style is the default comment style and should be used in most cases.

hashicorp-cla commented 8 months ago

CLA assistant check
All committers have signed the CLA.

jpogran commented 8 months ago

Thank you for your contribution @fabianopimentel!

The purpose of this extension is to provide generic syntax highlighted and limited language support for generic HCL files, not Terraform files. As such, it conforms to the generic HCL syntax specs. Since this extension is for any HCL type file, and VS code only allows one line comment here, we have to choose the one that all HCL files share.

The Terraform extension uses # as the default line comment character. Since you say you are working with Terraform files, you should use this extension and leave the HCL extension for other products.

fabianopimentel commented 8 months ago

Hi James,

I understand perfectly. No problem!

Regards,

On Wed, Dec 13, 2023 at 1:30 PM James Pogran @.***> wrote:

Thank you for your contribution @fabianopimentel https://github.com/fabianopimentel!

The purpose of this extension is to provide generic syntax highlighted and limited language support for generic HCL files, not Terraform files. As such, it conforms to the generic HCL syntax https://github.com/hashicorp/hcl/blob/main/hclsyntax/spec.md#comments-and-whitespace specs. Since this extension is for any HCL type file, and VS code only allows one line comment here, we have to choose the one that all HCL files share.

The Terraform extension uses # as the default line comment character. Since you say you are working with Terraform files, you should use this extension and leave the HCL extension for other products.

— Reply to this email directly, view it on GitHub https://github.com/hashicorp/vscode-hcl/pull/279#issuecomment-1854265352, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMCQ226O5UTSKWNXG23UTYJHJZFAVCNFSM6AAAAABAISS3R6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJUGI3DKMZVGI . You are receiving this because you were mentioned.Message ID: @.***>

radeksimko commented 8 months ago

Since there is no further action needed here I'm going to close the PR.

Just for posterity, here is the link to the Terraform extension: https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform and here is the relevant repository: https://github.com/hashicorp/vscode-terraform (for reporting issues).