Skip to content

frontend/lsp: Signature of Nodes #1015

Description

@flofriday

When hovering over a definition or the usage of a definition it might be handy do show a signature like other languages.

IntelliJ Example

Image

While the LSP could attempt to recreate that on it's own, I think it makes much more sense if that information comes straight from the AST.

@jaraonthe-dot-net what would you need in the LSP to implement such hover contents?
I don't think with the current structure and reasonable effort we can get comments or docstrings etc but besides that.

Suggestion:

@Nullable
public String signature()

For definitions that would always return something but most expressions won't like I cannot make out what a binary expression should return here but a LetExpression could return the variables it defines. Or should we just limit it to definitions?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions