-
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
documentSymbol method (SymbolInformation) should return tree instead of flat list #327
Comments
Related discussion: #132 |
Also related to #136 |
A new hierarchical outline has been added in VS Code . What does this mean for the LSP? |
Either we have a second request or we add a second return type to the existing one. Something like |
A first cut can be found here: https://github.com/Microsoft/vscode-languageserver-node/tree/dbaeumer/373 |
Feedback appreciated. |
@dbaeumer Thanks, Dirk. I took a quick look at your commit. I wonder if the Also, the idea is that the response to a |
@rcjsuen Yes, the idea is that the reponse returns DocumentSymbol[] | SymbolInformation[] | null Note that it is DocumentSymbol[]. Reason being is that I am not a fan of an artificial root node for the file which in some languages will not represent a symbol. |
Making the |
From the
Isn't it already supported by the protocol? (Sorry for the noise, if no.) |
Yes, seems to be already implemented with new outline feature in vs code |
@kittaakos thanks for pointing this out. |
Currently there is no protocol defined way to build a tree of symbols (e.g. method foo inside class Bar inside package buz). It results that there is no reliable way to build outline of symbols.
SymbolInformation
containslocation
andcontainerName
members.There should be some parent member or something.
The text was updated successfully, but these errors were encountered: