radian-software / prescient.el

☄️ Simple but effective sorting and filtering for Emacs.
MIT License
603 stars 25 forks source link

Disable vertico-prescient-mode for some functions #145

Closed Cletip closed 1 year ago

Cletip commented 1 year ago

Hi !

I use vertico and consult with vertico-prescient-mode. I find all the suggestions perfect, except for some commands: I'm thinking for example of consult-line. Indeed, I would really like to keep the order of the increasing lines, and therefore disable vertico-prescient-mode for the consult-line function, but only for this one. How can I do this ?

okamsn commented 1 year ago

What is your value for vertico-prescient-override-sorting? By default, the Prescient sorting is only used for completion tables that don't specify a sorting function. Looking at its code, consult-line should be specifying identity as the sorting function.

Cletip commented 1 year ago

You're absolutely right, I had the wrong variable when I configured it (vertico-prescient-override-sorting instead of vertico-prescient-enable-sorting). vertico-prescient-override-sorting is now set to nil, and everything looks fine. Sorry for the false issue.

Thanks for your answer.