Skip to content

provideWorkspaceSymbols API does not take into account multi-word queries #195368

@gabrielBusuioc

Description

@gabrielBusuioc

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.81.1
  • OS Version: Ubuntu 22.04.2 LTS

Steps to Reproduce:

  1. Register a dummy WorkspaceSymbolsProvider and log the query argument
export function activate(context: vscode.ExtensionContext) {
   function provideWorkspaceSymbols(myQuery, token): vscode.SymbolInformation[] {
        vscode.window.showInformationMessage(myQuery)
        return [];
    }

    let disposable = vscode.languages.registerWorkspaceSymbolProvider({
        provideWorkspaceSymbols
    });

    context.subscriptions.push(disposable);
}
  1. Use ''go to Symbol in Workspace'' -> "query1 query2"
  2. myQuery will have its value equal to "query1"

I`m not sure if this is intended but I think it should be up to the symbols provider to decide whether or not to treat ( or make use of ) such cases.

Metadata

Metadata

Assignees

Labels

*as-designedDescribed behavior is as designedbugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberworkspace-symbols

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions