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 returning non-hierarchical symbols #4113

Merged
merged 2 commits into from
Apr 25, 2020

Conversation

kjeremy
Copy link
Contributor

@kjeremy kjeremy commented Apr 23, 2020

If hierarchicalDocumentSymbolSupport is not true in the client capabilites
then it does not support the DocumentSymbol[] return type from the
textDocument/documentSymbol request and we must fall back to SymbolInformation[].

This is one of the few requests that use the client capabilities to
differentiate between return types and could cause problems for clients.

See microsoft/language-server-protocol#538 (comment) for more context.

Found while looking at #144

@kjeremy kjeremy force-pushed the support-non-hierarchy branch from af4a605 to 5c0cc96 Compare April 23, 2020 22:19
@kjeremy
Copy link
Contributor Author

kjeremy commented Apr 23, 2020

I'm not thrilled that the shape of the code in the two if branches is the same.

kjeremy added 2 commits April 24, 2020 10:08
If `hierarchicalDocumentSymbolSupport` is not true in the client capabilites
then it does not support the `DocumentSymbol[]` return type from the
`textDocument/documentSymbol` request and we must fall back to `SymbolInformation[]`.

This is one of the few requests that use the client capabilities to
differentiate between return types and could cause problems for clients.

See microsoft/language-server-protocol#538 (comment) for more context.

Found while looking at rust-lang#144
@kjeremy kjeremy force-pushed the support-non-hierarchy branch from 5c0cc96 to 0619c67 Compare April 24, 2020 14:14
@matklad
Copy link
Member

matklad commented Apr 25, 2020

bors r+

bors bot added a commit that referenced this pull request Apr 25, 2020
4113: Support returning non-hierarchical symbols r=matklad a=kjeremy

If `hierarchicalDocumentSymbolSupport` is not true in the client capabilites
then it does not support the `DocumentSymbol[]` return type from the
`textDocument/documentSymbol` request and we must fall back to `SymbolInformation[]`.

This is one of the few requests that use the client capabilities to
differentiate between return types and could cause problems for clients.

See microsoft/language-server-protocol#538 (comment) for more context.

Found while looking at #144

4136: add support for cfg feature attributes on expression #4063 r=matklad a=bnjjj

close issue #4063

4141: Fix typo r=matklad a=Veetaha



4142: Remove unnecessary async from vscode language client creation r=matklad a=Veetaha



4145: Remove dead code r=matklad a=matklad



bors r+
🤖

Co-authored-by: kjeremy <[email protected]>
Co-authored-by: Benjamin Coenen <[email protected]>
Co-authored-by: veetaha <[email protected]>
Co-authored-by: Aleksey Kladov <[email protected]>
@bors
Copy link
Contributor

bors bot commented Apr 25, 2020

This PR was included in a batch that was canceled, it will be automatically retried

@bors
Copy link
Contributor

bors bot commented Apr 25, 2020

@bors bors bot merged commit 7021352 into rust-lang:master Apr 25, 2020
@kjeremy kjeremy deleted the support-non-hierarchy branch April 27, 2020 19:00
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.

2 participants