vscode-cpptools
vscode-cpptools copied to clipboard
Allow "fuzzy" substring symbol search, similar to Go To File (CTRL+P) and Completion
Is it possible to support substring searching in Symbol Search, just like the way the search in Go to File (CTRL+P) works today?
We already support substring search. Can you provide repro details where this is not working?
For Go To File, you can type something like foobar and it would be able to find foo_baz_bar.cpp. However for Go To Symbol, that's not possible. Some of our users noted that the experience is inconsistent. They are big fans of the Go To File substring search, and would love to have the same feature for symbol search
@sean-mcmanus, @sherryyshi is asking for "fuzzy" search (as we refer to it) like we have for completion, etc.
Coming from Sublime, that would be a killer feature for me too.
This is a killer feature and I miss this very much coming to VS Code from Source Insight.
I don't think VS implements this either. I actually implemented this 8 months ago in response to https://github.com/microsoft/vscode-cpptools/issues/3416 (well, that was for completion instead of symbol search, but the code chang would be similar) , but after consulting the VS team I discovered that the addition of "*" wild cards to add the fuzziness was expected to have a major performance hit (for large databases), so I abandoned the change. However, I believe the PR change could be revived if we added an opt-in setting, which would allow users who really want the feature to get it (assuming they're okay with the performance...or maybe a separate "fuzzy go to symbol" command instead of a setting).
Any update about this feature?
@ppggff No updates. It's not on our schedule to get implemented (more upvotes needed).
This feature request has received enough votes to be added to our backlog.
Any plan about this feature in 2022?
@ppggff Not yet. We're working on other features (clang-tidy integration, create definition from declaration, etc.). However, I think it'd be pretty quick for us to add an opt-in setting to enable it, and a few lines of code to implement (there's already a PR that implements this, but it was abandoned due to potential performance reduction).
Any plans to fix this?
@ppggff Same as 4 months ago, i.e. not currently.
@sean-mcmanus I have a suggestion to implement this feature, But still not suffer from the performance penalty you mentioned with * & fuzzy search.
What if we ignore the * from the query when we try to compare with the results using fuzzy search ? The * will only be for the LSP queries to handle if they support wild card searches.
So a query sent to LS will look as follows Concurrent*Queue will return all symbols start with Concurrent and ends with Queue if the LS supports.
Then at vscode client side, We remove all * from the query and use ConcurrentQueue as the fuzzy search query which will also highlight the items which matched the LS query with wild card as it works in file search.
WDYT ?
@gayanper I don't understand your suggestion. The only "*" usage is in the low level details of our implementation in cpptools and not at any higher level (user input or TypeScript).
@sean-mcmanus i think my suggestion should goto vscode. When i made my suggestion I thought i was reading a vscode. But now i see its ccptools. Sorry
Possibly related VS Code issue tickets: microsoft/vscode#33746 and microsoft/vscode#156865.
Possibly related Stack Overflow question: How can I search symbols with partial words in VS Code with IntelliSense?
@ppggff Not yet. We're working on other features (clang-tidy integration, create definition from declaration, etc.). However, I think it'd be pretty quick for us to add an opt-in setting to enable it, and a few lines of code to implement (there's already a PR that implements this, but it was abandoned due to potential performance reduction).
Hi @sean-mcmanus , one more year again and any plan to add the opt-in setting? In my opinion, this should be a high-priority feature
Does this change solve this requirement https://github.com/microsoft/vscode/pull/159377 ?
I've filed a feature request on VS at https://developercommunity.visualstudio.com/t/Add-C-fuzzy-symbol-search/10306966 -- if VS adds that feature then we should get that as well. I've mentioned the upvotes on this issue, but upvoting that VS issue may help as well.
@gayanper I don't understand your PR.
one more half year passed and any progress made? I am being suffered on lack of this feauture. Hope it can be merged asap
@Shaka0723 No progress yet. It's currently the 10th most upvoted feature request. We're currently working on the 1st most upvoted feature request. See https://github.com/Microsoft/vscode-cpptools/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+-label%3Adebugger .
A significant update to Go To Symbol has been published in the insiders build - see https://github.com/microsoft/vscode-cpptools/issues/11557