Hierarchical symbols#176
Conversation
|
Thanks for continuing the efforts! The filename is Personally I'd prefer to not show |
| result['kind'] = _kind(name) | ||
|
|
||
| # All assignments have the filename as a there toplevel parent. | ||
| if parent and parent.parent(): |
There was a problem hiding this comment.
We still need this check, otherwise the filename is always the top most symbol.
|
I added the check to remove the top-level module name. But there's not sensible way to get rid of x and y without excluding things like a. So I'm going to leave it in for now. |
|
@lgeiger I just had a thought... the names should be fully qualified. Otherwise a variable defined in constructors of two classes (init method) can't be disambiguated. |
👍
That's totally possible. That's what this check did.
I don't know if I fully understand you, but I think they can be distinguished easily by the indentation in the UI since the |
|
What I mean is that |
|
I think we already make that check right? https://github.com/palantir/python-language-server/pull/176/files#diff-cee448b8821a222944d7e6f2ca332ddaR28 [edit] I see what's missing. Let me fix. |
Yes, that's why the correct start and end positions are important for the UI to figure out where they belong. |
|
Got it, the positions are used in addition to containerName. Also, on second thoughts, a variable local to a function is still a symbol. So going to leave them. |
No, the check here also tests if the
Yeah, it's not exactly the most elegant way to infer hierarchy 😄
I'm OK with this. I don't know what the canonical way would be. |
|
Ok, sounds sounds like we're in agreement. I also don't mind if the client excludes variables whose container symbol is a function. Most outline views tend to be expandable trees though, so I wonder if it can just be solved with default level of expanded subtrees. Anyway, going to merge to get this out the door. Thanks for all your help / opinions! |
It's not so easy to solve this with default levels since one would also exclude class methods then.
Cool looking forward to the next release. |
|
Do you think that we will have a new tagged release for this soon? |
|
@lgeiger The is a new release now. |


@lgeiger want to decide on what the symbols look like:
IMO:
sysaBB.__init__B.__init__.xmainmain.y