Vertico with minibuffer at the bottom #673
Unanswered
emlautarom1
asked this question in
Q&A
Replies: 3 comments 4 replies
|
The following ended up doing the trick: ;; Vertico: vertical completion UI.
(use-package vertico
:ensure t
:init
(vertico-mode t)
:config
;; Render candidates *above* the prompt in standard order, keeping the
;; prompt/input at the bottom of the minibuffer.
(cl-defmethod vertico--display-candidates (lines)
(move-overlay vertico--candidates-ov (point-min) (point-min))
(unless (eq vertico-resize t) ; pad below to a fixed height (list hugs the top)
(setq lines (nconc lines
(make-list (max 0 (- vertico-count (length lines))) "\n"))))
(let ((string (apply #'concat lines)))
(add-face-text-property 0 (length string) 'default 'append string)
(overlay-put vertico--candidates-ov 'before-string string))
(vertico--resize-window (length lines)))
:custom
(vertico-cycle t) ; wrap around at the first/last candidate
(vertico-count 12)) ; candidates shown above the promptIt would be great though if this could be a built-in feature instead of a hack (requires redefining internals) |
3 replies
|
What about |
0 replies
|
@minad
Note that the first candidate selected is at the bottom and the order is reversed (as expected from the name). This means that to go to the "next" candidate I need to press
After pressing |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
By default, Vertico has the prompt at the top, and candidates beneath it. This is not the standard way Emacs handles completions, where the prompt is always at the bottom of the screen, and completions appear on top of it (in a separate buffer, but that's besides the point).
What I would like to have is something like the following:
consult-line), where navigating to the next candidate (<down>) moves you in the same direction as they appear in the buffer.All reactions