-
Notifications
You must be signed in to change notification settings - Fork 285
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] Location ranges should span entire definition #188
Comments
Can you find a Microsoft implementation of outline view? I'd rather use that as reference for how to interpret something explicitly forbidden in the protocol: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#document-symbols-request Some of the comments do hint at the location spanning more than just the identifier name:
But then shortly after, inferring hierarchy is disallowed:
And this warning is repeated for
|
Yes, see also microsoft/language-server-protocol#132. |
@svenefftinge I can't seem to be able to reproduce this? The ranges PYLS reports (at least now, wonder if Jedi changed?) span the full definition: Please re-open if you're still seeing issues |
Since the LSP doesn't provide hierarchical symbols, yet, outline tree implementations for Vs Code, Theia and Eclipse are based on location.ranges to compute parent/child relationship based on nesting. This python LS unfortunately only covers the range of the identifier not the full construct, so it doesn't work here. Other LS implementations provide the full range.
See e.g. https://github.com/patrys/vscode-code-outline/blob/master/src/symbolOutline.ts#L97
The text was updated successfully, but these errors were encountered: