Skip to content
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

Workspace Symbol Provider called with empty string doesn't return all workspace symbols #37954

Open
usernamehw opened this issue Apr 14, 2020 · 1 comment
Labels
Bug A bug in TypeScript
Milestone

Comments

@usernamehw
Copy link

TypeScript Version: 3.8.3

Search Terms: Workspace Symbol Provider executeWorkspaceSymbolProvider

Running this code from vscode extension:
Code

const allSymbols = await commands.executeCommand('vscode.executeWorkspaceSymbolProvider', '');
console.log(allSymbols);// []

Expected behavior:

All the symbols in workspace returned

Actual behavior:

An empty array returned


Workspace symbol provider says empty string should return all symbols.

/**
 * Project-wide search for a symbol matching the given query string.
 *
 * The `query`-parameter should be interpreted in a *relaxed way* as the editor will apply its own highlighting
 * and scoring on the results. A good rule of thumb is to match case-insensitive and to simply check that the
 * characters of *query* appear in their order in a candidate symbol. Don't use prefix, substring, or similar
 * strict matching.
 *
 * To improve performance implementors can implement `resolveWorkspaceSymbol` and then provide symbols with partial
 * [location](#SymbolInformation.location)-objects, without a `range` defined. The editor will then call
 * `resolveWorkspaceSymbol` for selected symbols only, e.g. when opening a workspace symbol.
 *
 * @param query A query string, can be the empty string in which case all symbols should be returned.
 * @param token A cancellation token.
 * @return An array of document highlights or a thenable that resolves to such. The lack of a result can be
 * signaled by returning `undefined`, `null`, or an empty array.
 */

Redirected from microsoft/vscode#94770

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Apr 20, 2020
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Apr 20, 2020
@qqaimh
Copy link

qqaimh commented Jun 24, 2024

python also has this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants