Skip to content

[symbols] do not auto-limit the result of the workspace symbol request #915

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
martinlippert opened this issue Dec 5, 2022 · 0 comments
Closed
Assignees
Labels
for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: spring index & symbols type: enhancement

Comments

@martinlippert
Copy link
Member

At the moment, we limit the number of workspace symbols that the language server returns to the client to 50 symbols max. This can cause issues on the client side, since the client has no clue about this limitation. If the client, for example, filters the workspace symbols to identify specific ones, the client can't be sure that is got all the symbols, since "the interesting ones" might have been randomly cut off by the language server when returning only 50 symbols max.

We should not limit the max number of workspaces symbols that the language server returns, but keep that logic to the client. The client decides whether it wants to get all the symbols (and submits the request without or with an empty search query param) or just a limited set of symbols (and then submits a query param).

If we need a mechanism to limit the max number of symbols in the result (for whatever reason), we can introduce a search query param to submit that information to the language server, like we do that to return only symbols belonging to a certain project (or URI prefix, for me precise). But that is not specified in the LSP.

@martinlippert martinlippert added type: enhancement theme: spring index & symbols for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode labels Dec 5, 2022
@martinlippert martinlippert added this to the 4.17.1.RELEASE milestone Dec 5, 2022
@martinlippert martinlippert self-assigned this Dec 5, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: spring index & symbols type: enhancement
Projects
None yet
Development

No branches or pull requests

1 participant