hcl-lang
hcl-lang copied to clipboard
Improve rendering of complex types in hover
Context
Currently we provide relatively inconsistent hover data for various complex types:
i.e. we render nested objects with the appropriate nesting, markdown syntax etc. but we leave all other types to be rendered as "human friendly" names.
variable "test" {
type = object({
str = string
num = number
bl = bool
bar = map(string)
lst = list(string)
set = set(string)
tpl = tuple([number, string])
baz = object({
noot = string
})
})
}
output "test" {
value = var.test
}
Proposal
Consider rendering all types as valid typeexpr syntax, e.g. map(string) instead of map of string or list(bool) instead of list of bool.