You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users can write their configuration as HCL - which is typically preferred when configuration is hand-written, or they can choose to use a JSON-based variant of the language when generating configuration.
There is little benefit (esp. when compared to the amount of effort needed to implement it) in improving editing experience of JSON configuration, such as providing completion, hover, semantic highlighting etc. within.tf.json.
However users would likely benefit from the parsed version of that file, for example:
diagnostics where configuration of the module as whole is considered
references from generated .tf.json files are completable within .tf files
Proposal
modify ParseConfiguration background operation so that it also parses .tf.json
update any logic within hcl-lang to make sure that completion/hover/sem. tokens etc. for within these JSON files gracefully error out (i.e. not crash or error with weird errors), or are ignored
update any logic within hcl-lang to make sure references are collected and filtered correctly from JSON files
The text was updated successfully, but these errors were encountered:
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 details necessary to investigate further.
Current Version
Context
Users can write their configuration as HCL - which is typically preferred when configuration is hand-written, or they can choose to use a JSON-based variant of the language when generating configuration.
https://www.terraform.io/docs/language/syntax/json.html
Use-cases
There is little benefit (esp. when compared to the amount of effort needed to implement it) in improving editing experience of JSON configuration, such as providing completion, hover, semantic highlighting etc. within
.tf.json
.However users would likely benefit from the parsed version of that file, for example:
.tf.json
files are completable within.tf
filesProposal
ParseConfiguration
background operation so that it also parses.tf.json
terraform-ls/internal/terraform/module/module_ops.go
Lines 163 to 166 in 6d124da
hcl-lang
to make sure that completion/hover/sem. tokens etc. for within these JSON files gracefully error out (i.e. not crash or error with weird errors), or are ignoredhcl-lang
to make sure references are collected and filtered correctly from JSON filesThe text was updated successfully, but these errors were encountered: