-
Notifications
You must be signed in to change notification settings - Fork 58
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
Filtering in the Outline View #254
Comments
Can you please give an example of 1 actual user-story where filtering would be helpful (eg in Wild Web Developer, or Corrosion, or ShellWax...)? |
I do not know enough about Corrosion, etc. I think it is natural to offer this - which is also why VS Code has this implemented in their Outline/Breadcrumbs (per content-type https://www.youtube.com/watch?v=eyJS7rgRSYw). |
Then it seems to be something to discuss with the Language Server. |
I looked at a few tickets opened for WildWebDeveloper. There is no such concrete ticket but I see one usability ticket that goes in a similar direction: |
Would you be open to a contribution of this feature? |
From what I read of the description, it really doesn't seem like a client side/Wild Web Developer issue. When I read "Not all elements returned from the LS make always sense to be shown", then it's a clear sign that the language server should be changed or configured to hide what doesn't make sense. The purpose of LSP spec is to interact with the UI, the grain of action is the UI, so having things that do not make sense in the UI being returned by the LS seems like a LS issue. |
I do not think it is correct to say that it is a workaround for a bug in a language server. The language server will return as many elements as make sense - that is: if there is a constant, method, function, enum, enumKind, etc. it should be in the response even if there are many of them. How the result is visualized is up to the client. Taking Java as an example, there I would expect that all methods, all fields, all constants, etc. are returned from the LS. Given there is limited space on a screen, it makes sense to filter out certain elements in the Outline View based on the users needs. I am not aware of specific support in LSP to configure the result returned from the LS. Please remember that established products already implemented this functionality:
So I argue that this is not providing a workaround but implementing an expected feature of the LSP client. |
Is it available for all languages using LSP? (XML, Java...)? Is it real filtering on client side, or passing some LS configuration so the LS skips from SymbolKinds? |
I checked VS Code 1.71.2 by tracing the communication between LS and VS Code. There is no configuration request sent to the LS that restricts the SymbolKinds so it all happens in the client. The setting which SymbolKinds are shown is not per content-type in VS Code. |
OK. Let's try to mimic that in LSP4E. |
Has there been any progress on this? Maybe I could give it a try if nobody started implementing that feature. |
I'm not aware of anyone actually started to work on it, so contributions here remain fully welcome! |
Hello @mickaelistria, |
Hi @gerdleon, I think that after the recently merged PR, LSP4E now has the same functionality as VS Code, according to your comment in #254 (comment), thus I am closing the issue. Regards |
@travkin79 I have seen some strange behavior. Sometimes the "Donut", marked red in the screenshot, disappears. It seems that it happens most often upon first opening of the outline view but others in my team have seen it happen in seemingly random places. |
Hi @gerdleon, |
@travkin79 thank you! |
Similar to other Outline Views it would be useful to be able to filter the elements shown in the outline. For a minimal viable feature it is likely the SymbolKind that is used for the filtering.
For a user it would be nice to be able to do such filtering but I am unsure about it in the context of LSP since it could differ based on the content-type. Meaning in one content-type hiding fields will be a reasonable filter but for another it would filter out nearly everything.
Do you have an opinion? Are the others seeing a need for such filtering?
The text was updated successfully, but these errors were encountered: