Skip to content

New inlay hints, regression: no hover tooltip on inlay hint #11705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Walther opened this issue Mar 14, 2022 · 2 comments
Closed

New inlay hints, regression: no hover tooltip on inlay hint #11705

Walther opened this issue Mar 14, 2022 · 2 comments

Comments

@Walther
Copy link
Contributor

Walther commented Mar 14, 2022

Massive thanks for landing the fancy new inlay hints! 🧡

I have been a big fan of the inlay hints for a long while, and I use them all the time. That's also why I noticed a small regression in the feature and am hoping this is something that can be easily fixed.

Previously, the inlay hints themselves were hoverable to get an information box of the type that was inlaid. Additionally, holding cmd while hovering it provided additional information - similar to hovering any actual variable instances.

Currently, with the new inlay hint version, there's no information box given when you hover an inlay hint.

In some cases, it is possible to move the cursor to a nearby variable which holds the instance of the type, but this is less convenient. For example sometimes in pattern matching cases, the variable may be very small (one letter) compared to the inlay hint, which will have the full name displayed.

Additionally, in some cases such as method chaining, the inlay hints very helpfully show the intermediate types during the chain, but you won't have the actual variables available for hover tooltips at all.

It would be great to have the hover-ability back for the inlay hints. I hope this is possible to fix within the new inlay hint api.

Thanks for all your hard work!


Context:
VSCode Version: 1.65.2 (Universal)
VSCODE Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
rust-analyzer version: v0.2.975

@Veykril
Copy link
Member

Veykril commented Mar 14, 2022

I was very confused because this was never a thing, but I just realized hovering the decorator was like hovering the identifier next to it (or the expression for chains) for which we do gave away the type in the hover 😅 So ye technically thats a regression.

This would be part of #11701 where we can actually make every segment hoverable on its own.

@lnicola
Copy link
Member

lnicola commented Mar 17, 2022

@Veykril can we close this in favour of #11701?

@Veykril Veykril closed this as completed Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants