-
Notifications
You must be signed in to change notification settings - Fork 78
textDocument/documentSymbol seems to ignore identical symbols #81
Comments
This is a side-effect of our conversion into a tree structure. Each item has a "containerName" which in the case of multiple items with the same name is ambiguous. Not sure what the best approach is here. The protocol is quite weak when it comes to documentSymbols and the tree structure. |
Mm, yes, it returns an array but the way the JSON is setup implies that it should be a tree... :( See also Microsoft/language-server-protocol#112 and Microsoft/language-server-protocol#132. |
@damieng even so, I think an algorithm which collapses two nodes into one doesn't seem right? is that's what happening? Here's the Nuclide implementation: https://github.com/facebook/nuclide/blob/master/pkg/nuclide-vscode-language-service-rpc/lib/LspLanguageService.js#L1418 The Nuclide algorithm would see that all three items don't specify their parent containerName, so it'd pick the root |
My language server properly displays two symbols with the same name in VS Code but only one is displayed in Atom.
The text was updated successfully, but these errors were encountered: