Open
Description
Background
See hashicorp/terraform#29832 (landed in 1.1.0
)
Proposal
hcl-lang
- Recognize individual expressions when nested #496
- This may not be strictly a pre-requisite but it would likely make implementation easier if it was done before
- Ensure that
null
is generally recognized as semantic token type https://github.com/hashicorp/hcl-lang/blob/da78bbc8e7307ce6a4d4785821e9677769ef3efe/decoder/semantic_tokens.go#L443-L473
terraform-schema
- Add
nullable
as a valid attribute withinvariable
for the relevant Terraform versions - Ensure that we provide
null
asdefault = HERE
in completion (probably viaschema.LiteralValue
), in addition to whatever we inferred fromtype
- Ensure that module input completion also provides
null
as option
terraform-ls
- Ensure that
null
is generally recognized as semantic token typeterraform-ls/internal/lsp/token_encoder.go
Lines 110 to 151 in 22acbc1
Implementation Notes
This snippet demonstrates how HCL parser parses null
: https://go.dev/play/p/GfwVLgpCsWe