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

Support DocumentSymbol results from Roslyn #10560

Merged
merged 6 commits into from
Jul 1, 2024

Conversation

davidwengier
Copy link
Contributor

Our custom message target currently returns SumType<DocumentSymbol[], SymbolInformation[]>? but our endpoint blindly assumes SymbolInformation[]? is the return type. This is a bad thing because Roslyn can return either type, based on a client capability, and even the spec notes:

Servers should whenever possible return DocumentSymbol since it is the richer data structure.

This PR adds support for DocumentSymbol to our langauge server, and tests that cover both possible result types.

@davidwengier davidwengier requested a review from a team as a code owner July 1, 2024 02:07
@ryzngard
Copy link
Contributor

ryzngard commented Jul 1, 2024

Our custom message target currently returns SumType<DocumentSymbol[], SymbolInformation[]>? but our endpoint blindly assumes SymbolInformation[]? is the return type. This is a bad thing because Roslyn can return either type, based on a client capability, and even the spec notes:

Servers should whenever possible return DocumentSymbol since it is the richer data structure.

This PR adds support for DocumentSymbol to our langauge server, and tests that cover both possible result types.

Ah good catch. When I wrote the original it seemed like they only returned one type

@davidwengier davidwengier merged commit 92005de into dotnet:main Jul 1, 2024
12 checks passed
@davidwengier davidwengier deleted the DocumentSymbols branch July 1, 2024 21:17
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jul 1, 2024
@RikkiGibson RikkiGibson modified the milestones: Next, 17.12 Preview 1 Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants