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

Go-to-Definition on this/super params does not navigate #4031

Closed
guidezpl opened this issue Jun 25, 2022 · 4 comments
Closed

Go-to-Definition on this/super params does not navigate #4031

guidezpl opened this issue Jun 25, 2022 · 4 comments
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is enhancement
Milestone

Comments

@guidezpl
Copy link
Contributor

guidezpl commented Jun 25, 2022

Is your feature request related to a problem? Please describe.
Control+clicking typically goes looking for references (e.g. a constructor parameter). But in cases where it's unused (e.g. super.key, Ctrl+click "key"), no feedback is provided.

Describe the solution you'd like
Provide some indication that no references were found

Describe alternatives you've considered
Could also, in this specific instance, fallback to another reasonable action, such as going to the super constructor param.

Kapture.2022-06-25.at.16.24.40.mp4
@DanTup
Copy link
Member

DanTup commented Jun 30, 2022

We can't actually provide any feeback here, the interactions are controlled by VS Code. But, wouldn't it make more sense for Ctrl+Click here to jump to the definition of key in the super classes constructor?

@DanTup DanTup added the awaiting info Requires more information from the customer to progress label Jun 30, 2022
@guidezpl
Copy link
Contributor Author

That's also reasonable

@DanTup DanTup changed the title When Ctrl+clicking finds no references, provide feedback Go-to-Definition on super params does not navigate Jul 11, 2022
@DanTup DanTup added in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server and removed awaiting info Requires more information from the customer to progress labels Jul 11, 2022
@DanTup DanTup added this to the v3.46.0 milestone Jul 11, 2022
@DanTup DanTup changed the title Go-to-Definition on super params does not navigate Go-to-Definition on this/super params does not navigate Jul 11, 2022
@DanTup
Copy link
Member

DanTup commented Jul 11, 2022

Turns out the server already did this, but an optimisation in the LSP layer was causing it not to work correctly. Working on a fix at https://dart-review.googlesource.com/c/sdk/+/251108/.

copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Jul 11, 2022
Fixes Dart-Code/Dart-Code#4031.

Change-Id: Ic1a6ec5407cf3599bb4b88d5be1ff8c3efe50066
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251108
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
@DanTup
Copy link
Member

DanTup commented Jul 12, 2022

Fixed by dart-lang/sdk@d887dc8. Since it's an SDK change, it'll ship as part of a Dart/Flutter SDK release rather than Dart-Code release.

@DanTup DanTup closed this as completed Jul 12, 2022
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 in lsp/analysis server Something to be fixed in the Dart analysis server is enhancement
Projects
None yet
Development

No branches or pull requests

2 participants