| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Thanks for your interest in palantir/python-language-server, @CXuesong! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
Sorry, something went wrong.
... depends on whether LSP client supports hierarchicalDocumentSymbol.
|
Has this ever been resolved? It would be a great addition. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
c.f. #407
This PR should make textDocument/documentSymbol reponse use the new DocumentSymbol contract. This means you can have a list of children for each parent symbols. Now the documentSymbol is something like this
{ "jsonrpc": "2.0", "id": "2", "result": [ { "name": "ReadFields", "detail": "ReadFields", "range": { "start": { "line": 3, "character": 0 }, "end": { "line": 19, "character": 0 } }, "selectionRange": { "start": { "line": 3, "character": 4 }, "end": { "line": 3, "character": 14 } }, "kind": 12, "children": [ { "name": "closeFile", "detail": "ReadFields.closeFile", "range": { "start": { "line": 7, "character": 4 }, "end": { "line": 7, "character": 21 } }, "selectionRange": { "start": { "line": 7, "character": 4 }, "end": { "line": 7, "character": 13 } }, "kind": 13, "children": null }, { "name": "f", "detail": "ReadFields.f", "range": { "start": { "line": 9, "character": 8 }, "end": { "line": 9, "character": 22 } }, "selectionRange": { "start": { "line": 9, "character": 8 }, "end": { "line": 9, "character": 9 } }, "kind": 13, "children": null }, { "name": "closeFile", "detail": "ReadFields.closeFile", "range": { "start": { "line": 10, "character": 8 }, "end": { "line": 10, "character": 24 } }, "selectionRange": { "start": { "line": 10, "character": 8 }, "end": { "line": 10, "character": 17 } }, "kind": 13, "children": null }, { "name": "l", "detail": "ReadFields.l", "range": { "start": { "line": 14, "character": 8 }, "end": { "line": 17, "character": 0 } }, "selectionRange": { "start": { "line": 14, "character": 12 }, "end": { "line": 14, "character": 13 } }, "kind": 13, "children": null }, ...Python source code for reference
Unfortunately, I haven't tested it thoroughly in VSCode because I simply couldn't start Extension Development Host with yarn run vscode.