Closed neurolit closed 6 months ago
Thanks. It seems you can set corfu-prescient-override-sorting such that Prescient sorting takes precedence over the fixed order of cape-capf-super. Please let me know if it works.
You can also use cape-capf-properties
to override the sorting. Compare these two settings:
;; 1. Dabbrev candidates always come before Dict candidates
(setq completion-at-point-functions
(list (cape-capf-super #'cape-dabbrev #'cape-dict)))
;; 2. Dabbrev and Dict candidates may be mixed, UI sorting dominates
(setq completion-at-point-functions
(list (cape-capf-properties
(cape-capf-super #'cape-dabbrev #'cape-dict)
:sort t))) ;; Override: Enable sorting in the UI
(Note that this relies on an fix which I just pushed https://github.com/minad/cape/commit/80b41c67ab75eb57aa0fb527842f9d3d82002544 and which is not yet released.)
Thank you so much for your answer and for 80b41c6 fix! I tried it with:
(add-hook 'completion-at-point-functions (cape-capf-properties
(cape-capf-super #'my/people-completion #'cape-dabbrev #'cape-dict)
:sort t) 0 'local)
and it works perfectly.
Merry Christmas to you!
Hi!
First of all, I love Corfu and Cape, and it works very well. I'm using it with Orderless for filtering and Prescient for sorting.
However, I need some help in order to use prescient with
cape-capf-super
. I think it doesn't work (whereas it works with all other Corfu completions).In my
completion-at-point-functions
, I usecape-capf-super
in order to merge three completion tables:I noticed that when using this completion, results are sorted per function: all
my/people-compltion
results first, thencape-dabbrev
ones, and eventuallycape-dict
ones. Prescient doesn't seem to be used. If I change the order ofcape-capf-super
parameters, it changes the order of completion results.Here is my prescient configuration:
Do you know if there is a way to use prescient with
cape-capf-super
merged results?