For example, TypeScript shows the container that the variable is in (the getReferences function is in the ReferenceProvider class):

Include the variable container as its context:
- A struct's variable's container is the struct name.
- A function's variable's container is the function name.
Implementation details
- Modify
getDocumentSymbols/getWorkspaceSymbols to include the "children" symbols in the children field in the DocumentSymbols that it returns, and remove the "children" symbols from the top-level symbols (otherwise they'll be duplicated).