-
Notifications
You must be signed in to change notification settings - Fork 676
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
Add GoToTypeDefinition provider #5094
Conversation
PR OmniSharp/omnisharp-roslyn#2315 add a gototypedefinition endpoint. This PR adds a provider that utilizes the endpoint.
I'll try to take a look at this over the next couple of nights. |
// the defintion is in source | ||
if (goToTypeDefinitionResponse && goToTypeDefinitionResponse.Definitions) { | ||
|
||
for (const definition of goToTypeDefinitionResponse.Definitions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic should be sharable with https://github.com/OmniSharp/omnisharp-vscode/blob/090acf09c8/src/features/definitionProvider.ts#L36, pretty much in its entirety. Let's refactor these so they don't have to be maintained separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated to use the same CSharpDefinitionProvider
class to implement both DefinitionProvider
and TypeDefinitionProvider
, and put as much as I could into a shared function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (commit 6). @JoeRobich for another review.
Forgot I was using a local build of Omnisharp with the new endpoint for local testing. The "/gototypedefinition" endpoint was just added recently, so this will fail in CI until it uses the next Omnisharp release that includes it. |
Thanks @jtschuster! |
F12 is still not working. "Go to Type Definition" or "Go to Definition" are still not working. Does OmniSharp do ANYTHING at all? |
PR OmniSharp/omnisharp-roslyn#2315 add a
/gototypedefinition
endpoint. This PR adds a VS Code provider that utilizes the endpoint.Fixes #4251