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

Quick access: workspace symbols #93645

Closed
2 tasks done
bpasero opened this issue Mar 28, 2020 · 8 comments
Closed
2 tasks done

Quick access: workspace symbols #93645

bpasero opened this issue Mar 28, 2020 · 8 comments
Assignees
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Mar 28, 2020

Refs: #69955

Complexity: 2


Quick open is now using the quick input widget that leverages our new tree widget. All quick open providers have been rewritten from scratch.

All of the existing commands for driving quick open have been preserved. Everything should work as before with some additional features as noted in the test plan.

Note: configure "workbench.quickOpen.closeOnFocusLost": false to make testing easier by keeping quick open opened even if you navigate somewhere else.

  • verify you can see, filter and navigate to symbols of the active editor when typing # in quick open followed by a search string (note: at least for typescript this requires a typescript file to be opened in the background of the project you want to search in)
  • verify you see a symbol icon the reflects its kind
  • verify that any active word under the cursor is used as default query when opening
  • verify that you can narrow down symbols by container if you type the container name after a space (e.g. type foo bar to find all symbols that have foo in their label and bar in their description)
  • configure a files.exclude or search.exclude in the form of **/pattern/** and verify that symbols that have this pattern as their container do not appear (e.g. **/node_modules/** to exclude all results from that folder)
@bpasero bpasero added this to the March 2020 milestone Mar 28, 2020
@jrieken
Copy link
Member

jrieken commented Mar 31, 2020

configure a files.exclude or search.exclude in the form of /pattern/ and verify that symbols that have this pattern as their container do not appear

@bpasero Is that a new feature? It might raise some eyebrows because there have been asks to support the same for go-to-symbol and reference search but keep saying that it is the responsibility of the underlying language and its project system

@bpasero
Copy link
Member Author

bpasero commented Mar 31, 2020

@jrieken yes new, and yes agree this needs to be done on the LSP side of things. I think C++ for example is already working on supporting this.

Refs: #46718 (comment)

@bpasero
Copy link
Member Author

bpasero commented Mar 31, 2020

Here is the one from C++: microsoft/vscode-cpptools#5099

@jrieken
Copy link
Member

jrieken commented Mar 31, 2020

I'd say this is questionable because it also applies to other navigation feature. And also, why don't we pass this to the extension when making the request. This sounds wasteful, e.g search in node_modules so that we later drop all results.

@bpasero
Copy link
Member Author

bpasero commented Mar 31, 2020

@jrieken if you can point me to where I can pass this on to extensions via API then I can add it. I do not see such support in provideWorkspaceSymbols

But I am easy to remove this support until we figured out the better solution via extension API.

@jrieken
Copy link
Member

jrieken commented Mar 31, 2020

do not see such support in provideWorkspaceSymbols

Yeah, it would require new API and all of that. Tho, I still have trouble understanding the use-case, shouldn't I exclude folder from my project config if I don't want to see them? You are still getting compile errors and navigation results for those resources

@bpasero
Copy link
Member Author

bpasero commented Mar 31, 2020

I think the support for filtering via files.exclude and search.exclude is really a last resort solution in case the extension does not play by the rules. There may always be an extension that simply does not do this filtering properly and then this setting can be used.

@jrieken
Copy link
Member

jrieken commented Apr 1, 2020

But I am easy to remove this support until we figured out the better solution via extension API.

Given this reply #46718 (comment) I think that it would be better to hold off for now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants