You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm coming to ivy from flx-ido and found that filename matching was very different and less useful. I finally discovered the reason for the difference. When calling flx-score, flx-ido uses flx-file-cache, which is a filename cache defined in flx-ido.el. In ivy, the call to flx-score uses ivy--flx-cache which is a string cache defined in ivy.el. The difference in behavior is pretty big. Changing ivy--flx-cache to a filename cache would probably be too disruptive to people already familiar with the existing behavior. Maybe it would be possible add an official way to switch to using a filename cache rather than a string cache? In my current configuration I include (setq ivy--flx-cache (flx-make-filename-cache)) after ivy is loaded and the flex matching now works like I'm used to.
Here's an example of how matching is different. I have an sbt project with a source named something like "src/main/scala/org/fu/MySuperApp.scala". With a query of "ms" the string cache settles on the 'm' in main and the 's' in scala so all of my source code ends up with the same flx-score. The filename cache selects the 'M' and 'S' in the file name, which is a much more useful result.
The text was updated successfully, but these errors were encountered:
* ivy.el: Avoid registering eval-after-load hooks or unconditionally
loading flx at load time.
(ivy--flx-featurep): Turn variable into "thunk" function that only
tries loading flx once when actually needed. All uses changed.
(ivy-flx-cache): New escape hatch variable affording users control
over the default flx cache used.
(ivy--flx-cache): Turn variable into function that chooses between
types of flx cache subject to ivy--completing-fname-p and
ivy-flx-cache. All uses changed.
(ivy-flx-limit): Improve docstring style.
(ivy-toggle-fuzzy): Quote function symbols as such.
Fixesabo-abo#2816.
I'm coming to ivy from flx-ido and found that filename matching was very different and less useful. I finally discovered the reason for the difference. When calling
flx-score
, flx-ido usesflx-file-cache
, which is a filename cache defined in flx-ido.el. In ivy, the call toflx-score
usesivy--flx-cache
which is a string cache defined in ivy.el. The difference in behavior is pretty big. Changingivy--flx-cache
to a filename cache would probably be too disruptive to people already familiar with the existing behavior. Maybe it would be possible add an official way to switch to using a filename cache rather than a string cache? In my current configuration I include(setq ivy--flx-cache (flx-make-filename-cache))
after ivy is loaded and the flex matching now works like I'm used to.Here's an example of how matching is different. I have an sbt project with a source named something like "src/main/scala/org/fu/MySuperApp.scala". With a query of "ms" the string cache settles on the 'm' in main and the 's' in scala so all of my source code ends up with the same flx-score. The filename cache selects the 'M' and 'S' in the file name, which is a much more useful result.
The text was updated successfully, but these errors were encountered: