-
Notifications
You must be signed in to change notification settings - Fork 799
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
Workspace Hierarchy Request #136
Comments
Some food for thought: Many languages have a fully qualified structural element name for every symbol. Using such a unique identifier, you could represent the tree like this: interface SymbolInformation {
// other properties...
/** fully qualified structural element name (must be unique) */
id?: string;
/** an array of symbol FQSENs that this symbol is a child of in a class hierachy */
extends?: string[];
} You would then get the hierarchy from Whether it |
I agree that a hierarchy request is desirable. We could add this without breaking clients since clients that can't render this will not request it. |
@felixfbecker if we go by the example of Java, fqn's are not unique, neither at development time (check out multiple versions of the same class) nor at runtime (load different versions of the same class twice, in different class loaders). |
I worked on contributing proposed protocol more easily. A document describing this is here: https://github.com/Microsoft/language-server-protocol/blob/master/contributing.md May be someone wants to look into this. |
Summary: Requires building cquery on branch pelmers/containername-change to look correct. The LSP specification specifically warns against using documentSymbols containerName fields to create symbol hierarchies but that's exactly what we do in the outline view. In the future I think there would be better ways to do this. https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#textDocument_documentSymbol and discussion at microsoft/language-server-protocol#136 Reviewed By: a20012251 Differential Revision: D6451986 fbshipit-source-id: 9182535584910f82039662951a1d2b9e461b47d8
Initial proposal posted microsoft/vscode-languageserver-node#346 |
I added my comments in microsoft/vscode-languageserver-node#346 since it contains a concrete proposal. |
The current proposal for this feature is at #1231. Feel free to provide any feedback you might have. |
Type Hierarchy got merged into the LSP libs as proposed. |
Added to 3.17. |
It is important for object oriented languages to retrieve the inheritance information. I would like to discuss a new request for retrieving hierarchy of a given Symbol.
The text was updated successfully, but these errors were encountered: