-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use Fuzzy Search? #13
Comments
That would be quite useful, but the extension has to rely on the available mechanisms. In this case a "quick-pick" which currently has no option for that. |
That's a bit of shame. Would it be possible to make multiple calls to the quick-pick API and combine the results? So for example, searching for This should work fine for 2 and 3 word searches (the latter requiring 6 API calls which might slow things down, but should also return very few results). This is obviously not a scalable solution as the number of API calls required would grow factorially with the number of words, but I think it would be unlikely that more than 2 words is often necessary, let alone 3. Alternatively, are there other VSCode extensions which could act as a drop-in replacement to the quick-pick call? And as an interim 'fix', is it possible that it replaces all spaces with |
That is unfortunately not how the API works. The dropdown list is a unit and automatically filteres upon input with no way to change its logic apart from modifying where it searches (items have a label, optional description and details). If there is no other way i might consider the automatic replacement as a configuration option. |
Is it possible to use a similar API to the search used by |
That appears to use some internals that are not exposed in the public API available to extensions. There are already various issues open in the VS repository for functionality that would make it possible to implement a more lenient search. I will keep an eye on how that develops. |
any update on this? |
@fognome No, see upstream issue. |
Are there alternative, lower-level UI components that could be used instead of As well as performance and fuzziness, matching by alternate names would also be helpful, e.g. I expected to see |
There are no alternatives that I know of. The quick pick is virtualized, otherwise it would be way worse (it used to not be virtualized). A proposed option for delaying the search is already part the issue I opened. The extension has an option to use an initial search followed by paging in the quick pick, you could try using that; the downside is lack of live feedback on the initial search and having to deal with pages. "insert-unicode.disable-pre-filtering": false,
"insert-unicode.page-size": 500, // default, you can probably go higher here For matching, there are alternatives for some characters based on a Unicode-proveded list, some characters have quite a few but most have none. E.g. line feed (
I do not intend to extend this at the moment, though. The list of characters is huge and often this will be a one-time problem, eventually the character is found and the user now knows what to look for (and the character is at least locally added to the recently used list). Adding additional aliases may also cause characters to show up when people are looking for something else, so it can also potentially degrade the experience. Would recommend using the favorites for characters you need frequently. |
It would be good if the search was 'fuzzy', or at least less restrictive.
For example, I would expect that the search for
greek beta
would give all results which have bothgreek
andbeta
in their description; however, the extension only returns matches which containgreek beta
as an exact substring.I realize that it's possible to use
greek*beta
which is a partial solution, it is still sensitive to the order of words (for example,beta*greek
returns no result).The text was updated successfully, but these errors were encountered: