Skip to content

Instantly share code, notes, and snippets.

@ar1a
Last active May 30, 2018 03:32
Show Gist options
  • Save ar1a/b77d16fc40ab61ba81d0005fdd3d9d7e to your computer and use it in GitHub Desktop.
Save ar1a/b77d16fc40ab61ba81d0005fdd3d9d7e to your computer and use it in GitHub Desktop.
Helm posframes in emacs 26
;; Posframe!
;; https://www.reddit.com/r/emacs/comments/80bdck/using_a_posframe_to_show_ivys_candidate_menu/dvcsarc
(defvar helm-posframe-buffer nil)
(defun helm-posframe-display (buffer &optional _resume)
(posframe-show
(setq helm-posframe-buffer buffer)
:poshandler #'posframe-poshandler-frame-bottom-left-corner
:left-fringe 10
:width (frame-width)
:height 16 ;; ivy/+childframe uses 16
:respect-header-line t))
(defun helm-posframe-cleanup ()
(posframe-hide helm-posframe-buffer))
(add-hook! 'helm-cleanup-hook #'helm-posframe-cleanup)
(setq helm-display-function #'helm-posframe-display)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment