Open
Description
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: