feat(corfu): general move-to-minibuffer impl
We relied directly on consult for this, meaning it needed the vertico module. Now, it should defer to the user's choice, including helm, ivy and ido. Note the convention for this indirection is using the `completing-read` API, which all such packages implement. This diverges from Corfu's suggestion of `completion-in-region`, which only vertico and ivy seem to implement.
This commit is contained in:
parent
188e73b057
commit
1603c6c7dd
3 changed files with 13 additions and 11 deletions
|
@ -10,12 +10,13 @@
|
|||
|
||||
;;;###autoload
|
||||
(defun +corfu-move-to-minibuffer ()
|
||||
;; Taken from corfu's README.
|
||||
;; TODO: extend this to other completion front-ends.
|
||||
;; Adapted from Corfu's README.
|
||||
(interactive)
|
||||
(let ((completion-extra-properties corfu--extra)
|
||||
(completion-cycle-threshold completion-cycling))
|
||||
(apply #'consult-completion-in-region completion-in-region--data)))
|
||||
(pcase completion-in-region--data
|
||||
(`(,_ ,_ ,table ,pred ,extras)
|
||||
(let ((completion-extra-properties extras)
|
||||
completion-cycle-threshold completion-cycling)
|
||||
(completing-read "Completion: " table pred nil nil 'corfu-history)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +corfu-smart-sep-toggle-escape ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue