astoff/jit-spell

Possible to sort candidates in `completing-read` by e.g. Levenshtein distance?

ashton314 opened this issue · 1 comments

Hi there! I love how this package has been working.

I noticed that the context menu sorts candidates according to the spell-checkers recommendation. (Good!) However, when I use a completing-read interface (e.g. with Vertico) then the candidate order doesn't make sense. I'm always able to find the correct spelling, but it'd be nice if the word that's closes showed up close to the top.

Is there a way to make the completing-read interface respect the sorting? I've tried this out with both a custom Vertico+Orderless setup, as well as a vanilla Vertico configuration, and both instances, the candidate sorting wasn't what aspell was giving back.

This was done in the lastest commit in the repo, not yet released on ELPA. The completing-read now keeps the original suggestion order as you can see in the context menu.