Add posframes to helm in emacs 26+
This commit is contained in:
parent
49f16f681c
commit
ded367eef5
3 changed files with 23 additions and 1 deletions
|
@ -63,6 +63,25 @@
|
|||
(require 'helm-projectile)
|
||||
(set-keymap-parent helm-projectile-find-file-map helm-map)
|
||||
|
||||
;; Posframes!
|
||||
(when (and EMACS26+ (featurep! +childframe))
|
||||
(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))
|
||||
|
||||
;;; Helm hacks
|
||||
(defun +helm*replace-prompt (plist)
|
||||
"Globally replace helm prompts with `+helm-global-prompt'."
|
||||
|
|
|
@ -10,3 +10,5 @@
|
|||
(package! helm-projectile)
|
||||
(package! helm-swoop)
|
||||
(package! wgrep)
|
||||
(when (and EMACS26+ (featurep! +childframe))
|
||||
(package! posframe))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue