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

Add hierarchicalDocumentSymbolSupport to Text Document Client Capabilities #538

Merged
merged 2 commits into from
Aug 6, 2018

Conversation

lukel97
Copy link
Contributor

@lukel97 lukel97 commented Aug 6, 2018

This is already returned by the VS Code insiders build and in https://github.com/Microsoft/vscode-languageserver-node/blob/451eee78181d529cfa98ffc7198e2955cdfdc451/protocol/src/protocol.ts#L425.
It seems necessary in order to maintain backwards compatibility with clients that do not yet support the new DocumentSymbol type.

@aeschli aeschli merged commit 9d64e8c into microsoft:gh-pages Aug 6, 2018
@aeschli
Copy link
Contributor

aeschli commented Aug 6, 2018

Thanks @bubba !

@aeschli aeschli added this to the July 2018 milestone Aug 6, 2018
@DanTup
Copy link
Contributor

DanTup commented Nov 28, 2018

Does hierarchicalDocumentSymbolSupport mean "supports the DocumentSymbol type" or just that it supports having children populated? It's not totally clear from the spec, though I'm assuming it's the former (in which case I think documentSymbolSupport or something would've been a better name, though I guess that ship has sailed!)

@KamasamaK
Copy link
Contributor

It refers to the DocumentSymbol type. The new type was added in 3.10.0 and it is standard to have new fields for -ClientCapabilities when changes like this are made. The new type has more differences than just the children property, which was included with the type at its introduction.

I think the name documentSymbolSupport may not have been clear enough since it's also the name of the provider. The solution here is probably just a better description for that property in the documentation.

kjeremy added a commit to kjeremy/rust-analyzer that referenced this pull request 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 rust-lang#144
kjeremy added a commit to kjeremy/rust-analyzer that referenced this pull request 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 rust-lang#144
kjeremy added a commit to kjeremy/rust-analyzer that referenced this pull request Apr 24, 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 rust-lang#144
bors bot added a commit to rust-lang/rust-analyzer 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 <kjeremy@gmail.com>
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: veetaha <veetaha2@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
bors bot added a commit to rust-lang/rust-analyzer 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



Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: veetaha <veetaha2@gmail.com>
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.

None yet

4 participants