microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.28k stars 29.31k forks source link

Go To Source Definition UX improvements #152252

Open andrewbranch opened 2 years ago

andrewbranch commented 2 years ago

Following up on TypeScript’s new Go To Source Definition command (d851ea5d49b0ec89b98765d9e0084c25f2ff5031), I want to track some editor-side UX improvements:

mjbvz commented 2 years ago

@jrieken Any thoughts on these? I think we'd have to implement these in core

jrieken commented 2 years ago

Can we somehow indicate when a result is a guess? This is already returned in the protocol response via an unverified property, but it is never surfaced to the user.

There is currently no way to express that but it reminds me of https://github.com/microsoft/vscode/issues/74237 which is about adding a kind-property to references/locations. That would allow us to classify/filter/etc...

Can we replace the error notification for “no source definitions found” with an inline message similar to Go To Definition?

No sure how "go to source" is implemented but in case it is using the editor.action.goToLocations-command than a "no-results-message" can be passed