Merge pull request #627 from ar1a/helm-posframe

Add posframes to helm in emacs 26+
This commit is contained in:
Henrik Lissner 2018-06-01 13:06:48 +02:00 committed by GitHub
commit 5e9030500c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View file

@ -140,6 +140,28 @@
:config (setq wgrep-auto-save-buffer t))
(def-package! posframe
:when (and EMACS26+ (featurep! +childframe))
:after helm
:config
(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))
;;
;; Evil integration
;;

View file

@ -12,3 +12,5 @@
(package! wgrep)
(when (featurep! +fuzzy)
(package! helm-flx))
(when (and EMACS26+ (featurep! +childframe))
(package! posframe))