Open Alizter opened 1 year ago
Note that I fixed the type printing on hover for inductives, whether to print the definition indeed is open IMHO.
Still unsure how to better handle this, many inductives can be huge.
Do you have an idea on what to do? Maybe we could summarize the inductive definition somehow?
I'm unsure if Javascript is allowed in the hover, html is, we could use <details>
I suppose for now, showing the type is enough. It will let users disambiguate between types and terms at least.
I still think this issue has value tho, it is just that it is not clear how to implement it yet.
If LSP would get multi-hover that would be nice.
What we should do instead is use the peek menu and inspect using a goto.
That already works fine, right?
In #340 there is a basic type showing hover implemented. For inductive types this doesn't work due to how they are stored in the enviornment. In that case, we should experiment with printing the definition of the inductive type (with type annotations).
So hovering over
nat
should give:Perhaps formatted a bit nicer like