Skip to content

Improve rendering of complex types in hover #270

Open
@radeksimko

Description

@radeksimko

Context

Currently we provide relatively inconsistent hover data for various complex types:

Screenshot 2023-04-25 at 15 56 34

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions