Use hash instead of double slashes for single line comments
HCL syntax accepts both # and // for line comments, but # is more idiomatic.
This is also mentioned in Terraform documentation:
The # single-line comment style is the default comment style and should be used in most cases. Automatic configuration formatting tools may automatically transform // comments into # comments, since the double-slash style is not idiomatic.
https://developer.hashicorp.com/terraform/language/syntax/configuration#comments
Hey @jpenna, thanks for your contribution!
The purpose of this extension is to provide generic syntax highlighting and limited language support for generic HCL files, not Terraform files. We have the fully featured Terraform Extension with backing Terraform Language Server to handle Terraform files, which does use # as the default line comment character.
The HCL sytanx specification purposely does not choose one comment style over the other. Each application (Boundary, Nomad, etc) is supposed to define what they consider idiomatic. Since this extension is targeted at any other HCL based language than Terraform, we have to conform to the generic HCL sytanx specification.
May I ask what you are using vscode-hcl for that vscode-terraform does not provide? We may be able to address that there instead of making this extension too coarsely purposed for the intended goal.
Hello @jpogran , this was for settings, like .tflint.hcl. There was another file, but I deleted it, but I remember it was configuring something as well.
I understand what you are saying. Maybe this could be a setting for the vscode extension, since there are two ways of commenting and different projects might prefer one over the other.
Thanks for the change! I am just using is, is great now! :1st_place_medal: