Skip to content

investigate proposed VS Code API for hover verbosity level #2318

Open
@Techatrix

Description

@Techatrix

VS Code has an API proposal that adds the ability to request more or less information to be displayed in a hover popup. We should keep an eye on it and hope it is accepted and put into the LSP specification.

It can be used to provide these features (and many more):

  • peek into the function body when hovering over a function
  • show fields on function declarations when hovering over a container type
  • show size/alignment of types. See show size/alignment/padding in tooltip for type annotations #1677
  • hide the Goto ... list when hovering over a function
  • show all possible returned errors when hovering over a function

Fortunately, nothing is stopping us from adding it to ZLS anyway to experiment with it.

Here is a small demonstration of how this could look like:

Screencast_20250513_232041.webm

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