Skip to content

Add maxResults argument to provideWorkspaceSymbols #191725

Closed as not planned
Closed as not planned

Description

@mjbvz

JS/TS's workspace symbol provider currently limits the number of workspace symbols it returns to 256. This is done for performance reasons. In large repos, it is costly to collect and transmit tens of thousands of workspace symbols, especially when you consider that users typically only look at the first 10 or so

However there are cases where you really do want every single workspace symbol in a workspace, for example when an extension uses the vscode.executeWorkspaceSymbolProvider command. Today there is no way for an extension to get all JS/TS symbols as the VS Code api dose not provide a way to override TS Server's limit of 256 symbols per response

Proposal

Add a new maxResults argument to provideWorkspaceSymbols. This would have two benefits:

  • In the normal go to symbol in workspace flow, we could set maxResults = 500 or some other number. This would let extensions that observe this new argument improve their performance by not collecting and transmitting tons and tons of symbols

  • With the vscode.executeWorkspaceSymbolProvider command or other cases where something else besides VS Code is calling into provideWorkspaceSymbols, we provide a mechanism to explicitly request every single workspace symbol instead of leaving it up to language servers to determine how many symbols they should return for good performance

Activity

  1. added
    feature-request
    on Aug 31, 2023
  2. added a commit that references this issue on Sep 19, 2023
  3. added this to the On Deck milestone on Dec 6, 2023
  4. added
    *out-of-scope
    on Dec 9, 2024
  5. vs-code-engineering commented on Dec 9, 2024

    @vs-code-engineering
    Contributor

    We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

    If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

    Thanks for your understanding, and happy coding!

  6. mjbvz commented on Dec 9, 2024

    @mjbvz
    ContributorAuthor

    No longer have a use case for this. Can revisit if there is one in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*out-of-scopeapifeature-request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions