insert-unicode
insert-unicode copied to clipboard
Use Fuzzy Search?
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 both greek
and beta
in their description; however, the extension only returns matches which contain greek 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).
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 greek beta
would make two calls: greek*beta
and beta*greek
and combine the results?
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 *
automatically?
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 workbench.action.showAllSymbols
? That search is fuzzy, and uses the same (at least visually) search box.
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.