Support splat expressions (*
)
#526
Labels
enhancement
New feature or request
textDocument/completion
textDocument/hover
textDocument/semanticTokens
Semantic syntax highlighting
Depends on #492
This should most likely be implemented after #527
Background
Terraform supports splat expressions. For example:
var.list[*].id
var.list[*].interfaces[0].name
var.website[*]
Language server currently doesn't support these, which means that e.g.
Proposal
Completion
Relevant suggestions are provided via completion after
.
or when explicitly requested within a splat expression.For example, given a variable
user can type
at which point two suggestions would come up:
Hover
Details (type, description) about a splat expression are displayed on hover.
For example, given this config
we display
var.list[*]
list of string.Semantic Tokens
The splat operator
*
is recognized as such and reported as a semantic token to be highlighted accordingly.For example in this config
(the
value
part is already reported as attribute),var
,list
andid
will be reported as traversal steps, and*
as splat operator.The text was updated successfully, but these errors were encountered: