diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-12-08 00:12:40 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-12-08 00:16:39 +0100 |
| commit | 80a52e18cf22f465e15dd4f452468cefc4d55b4a (patch) | |
| tree | 4b2d1f5479a93d4f4df0f6c722f3da08f6f327bc /README.org | |
| parent | cea3f38e4b13e4ab53efd0bacd896000d66be2b3 (diff) | |
README update
Diffstat (limited to 'README.org')
| -rw-r--r-- | README.org | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -224,18 +224,21 @@ source code for further details. ** Completing in the minibuffer Corfu can be used for completion in the minibuffer, since it relies on child -frames to display the candidates. By default, ~global-corfu-mode~ does not -activate ~corfu-mode~ in the minibuffer, to avoid interference with specialised -minibuffer completion UIs like Vertico or Mct. However you may still want to -enable Corfu completion for commands like ~M-:~ (~eval-expression~) or ~M-!~ -(~shell-command~), which read from the minibuffer. Activate ~corfu-mode~ only if -~completion-at-point~ is bound in the minibuffer-local keymap to achieve this -effect. +frames to display the candidates. The Corfu popup can be displayed even if it +doesn't fully fit inside the minibuffer. There is a caveat however if you use +EXWM, since then an EXWM buffer will overlap the child frame. + +By default, ~global-corfu-mode~ does not activate ~corfu-mode~ in the minibuffer, to +avoid interference with specialised minibuffer completion UIs like Vertico or +Mct. However you may still want to enable Corfu completion for commands like ~M-:~ +(~eval-expression~) or ~M-!~ (~shell-command~), which read from the minibuffer. In +order to detect such minibuffers we can check if the variable +~completion-at-point-functions~ is set locally. #+begin_src emacs-lisp (defun corfu-enable-in-minibuffer () - "Enable Corfu in the minibuffer if `completion-at-point' is bound." - (when (where-is-internal #'completion-at-point (list (current-local-map))) + "Enable Corfu in the minibuffer." + (when (local-variable-p 'completion-at-point-functions) ;; (setq-local corfu-auto nil) ;; Enable/disable auto completion (setq-local corfu-echo-delay nil ;; Disable automatic echo and popup corfu-popupinfo-delay nil) |
