-
Notifications
You must be signed in to change notification settings - Fork 1.7k
getHovers does not return useful information for an import prefix #32735
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
Comments
Fixes #761 but we may wish to re-visit once dart-lang/sdk#32735 is fixed/responded to.
Fixes #761 but we may wish to re-visit once dart-lang/sdk#32735 is fixed/responded to.
Fixes #761 but we may wish to re-visit once dart-lang/sdk#32735 is fixed/responded to.
Fixes #761 but we may wish to re-visit once dart-lang/sdk#32735 is fixed/responded to.
Fixes #761 but we may wish to re-visit once dart-lang/sdk#32735 is fixed/responded to.
Still relevant; no tooltips for prefixes. |
Working on https://dart-review.googlesource.com/c/sdk/+/390960. I made it work but the current output is not great, still needs some thoughts. |
Something else that crosses my mind today (haven't tried anything just yet) is what should we do when two imports share the same alias? Something like: import 'dart:core' as dart;
import 'dart:async' as dart; When hovering on the acual import line we can differentiate easily enough, but not necessarily when inside the code if both import export a shared top level declaration (say |
I'm not sure what to do in the case of For VS Code / LSP, we're not tied to specifics of the protocol because we're just returning Markdown, so we could probably just duplicate whatever string we should for one when there are multiple. |
We aren't likely to make changes to the legacy protocol to support this. If clients that use the legacy protocol want to support this they could choose to use the LSP request instead. |
I think the CL is basically working. Does anyone want to review it (or to suggest someone) or should I add you both since you're here on the issue? |
@FMorschel thanks! I didn't notice in the CL but the text here is wrapped in triple backticks so it has language syntax highlighting applied to it (eg. I can easily fix, but thought I'd ping you in case you wanted to first :-) |
Given this code:
If you send a hover request for the
x
at the bottom you get this:There's no information in there to say that this import was for
dart:async
so it's hard to render a useful tooltip. If I hover overdart:async
I get a bunch of information including the dartdoc for the library. It's be nice if we could have this here to show the user information about whatx
is.The text was updated successfully, but these errors were encountered: