Skip to content

ivy display function

Oleh Krehel edited this page Oct 14, 2016 · 7 revisions

Intro

By default, Ivy displays the candidate list in the minibuffer. However, it’s very easy to make it display where you want: in a different window, or a frame, or an overlay etc.

Example:

(setq ivy-display-function 'ivy-display-function-lv)

Display candidates with lv

(require 'lv)

(defun ivy-display-function-lv (text)
  (let ((lv-force-update t))
    (lv-message
     (if (string-match "\\`\n" text)
         (substring text 1)
       text))))

Display candidates with popup

(require 'popup)

(defun ivy-display-function-popup (text)
  (with-ivy-window
    (popup-tip
     (setq ivy-insert-debug
           (substring text 1))
     :nostrip t)))