Skip to content
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

Show links to type definitions when hovering over a variable #3853

Open
miDeb opened this issue Mar 1, 2022 · 1 comment
Open

Show links to type definitions when hovering over a variable #3853

miDeb opened this issue Mar 1, 2022 · 1 comment
Labels
in editor Relates to code editing or language features is enhancement
Milestone

Comments

@miDeb
Copy link

miDeb commented Mar 1, 2022

Since in Dart oftentimes the type is not visible in the code (i.e. when making use of type inference), it is sometimes not straightforward to find the type written out to ctrl+click it to go to its definition.

I'd suggest adding a link to the type definition on hover, similar to what rust-analyzer does:
Bildschirmfoto von 2022-03-01 22-34-58-b

For instances of generic types it looks like this:
Bildschirmfoto von 2022-03-01 22-34-54-b

I think this feature would make it much easier to quickly go to type definitions.

@DanTup
Copy link
Member

DanTup commented Mar 2, 2022

Thanks for the suggestion - I really like this! Not being able to easily navigate to some types has come up a few times and it's good to see another language already providing something. Rust is using some custom LSP fields to make this work so the Dart server would need to do similar (at least until/unless microsoft/language-server-protocol#642 is implemented).

@DanTup DanTup added this to the On Deck milestone Mar 2, 2022
@DanTup DanTup added the in editor Relates to code editing or language features label Mar 2, 2022
@DanTup DanTup modified the milestones: On Deck, Backlog Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features is enhancement
Projects
None yet
Development

No branches or pull requests

2 participants