tumashu / vertico-posframe

GNU General Public License v3.0
114 stars 16 forks source link

feature request: compatibility with vertico multiform toggle #29

Closed Hugo-Heagren closed 1 year ago

Hugo-Heagren commented 1 year ago

It would be really great if this package provided a way to interactively toggle posframe mode during a completion session, similar to commands like vertico-multiform-grid, which toggle their respective modes. I've tried just evaluating (vertico-multiform--define-display-toggle posframe) -- it works for moving from a normal minibuffer to posframe, but not for going back.

I'd love to see this implemented!

tumashu commented 1 year ago

eval the below code and try f57b170

(defun vertico-multiform-vertical (&optional mode)
  "Toggle to display MODE temporarily in minibuffer.
MODE defaults to the vertical display."
  (interactive)
  (let (last)
    (dolist (m '(vertico-unobtrusive-mode
                 vertico-flat-mode

                 vertico-posframe-mode

                 vertico-grid-mode vertico-reverse-mode))
      (when (and (boundp m) (symbol-value m))
        (setq last m)
        (vertico-multiform--temporary-mode m -1)))
    (when (eq last mode)
      (setq mode vertico-multiform--display-last))
    (when mode
      (vertico-multiform--temporary-mode mode 1))
    (setq vertico-multiform--display-last last)))
tumashu commented 1 year ago

finished.

Hugo-Heagren commented 1 year ago

thanks!!!!