Support for references to variables and locals #491
Labels
enhancement
New feature or request
release-blocking
planned release will not ship without this
textDocument/completion
textDocument/hover
textDocument/semanticTokens
Semantic syntax highlighting
Milestone
Background
As part of initial work on supporting traversal expressions (references such as
aws_instance.example.public_ip
) it was decided to leave out variables, locals and outputs as the data types are not statically defined in the schema for these.Use-cases
Completion
Given a config
user should be able to auto-complete
var.test
orlocal.foo
forport
field (assumingport
is ofnumber
type).Hover
Given a config
a popup should appear once user hovers over
var.test
orlocal.protocol
with data type (e.g.string
ornumber
).Semantic Tokens
Given a config
both
var.test
andlocal.protocol
should be highlighted correctly via semantic tokens.Proposal
hcl-lang
'sschema.BlockAddrSchema
by addingBodyAsType
which can help express that avariable
block (referred to viavar.example
) is addressable as a type declared intype
attribute of that block.BodyAsType
indecoder.DecodeReferences
BodyAsType
interraform-schema
in the schema of the variable block withinterraform-schema
, e.g.hcl-lang
interraform-schema
terraform-schema
&hcl-lang
interraform-schema
The text was updated successfully, but these errors were encountered: