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
|
@ -20,7 +20,8 @@
|
||||||
(company ; the ultimate code completion backend
|
(company ; the ultimate code completion backend
|
||||||
+auto ; as-you-type code completion
|
+auto ; as-you-type code completion
|
||||||
+childframe) ; a nicer company UI (Emacs 26+ only)
|
+childframe) ; a nicer company UI (Emacs 26+ only)
|
||||||
;helm ; the *other* search engine for love and life
|
;(helm ; the *other* search engine for love and life
|
||||||
|
; +childframe) ; uses childframes for popups (Emacs 26+ only)
|
||||||
;ido ; the other *other* search engine...
|
;ido ; the other *other* search engine...
|
||||||
(ivy ; a search engine for love and life
|
(ivy ; a search engine for love and life
|
||||||
+childframe) ; uses childframes for popups (Emacs 26+ only)
|
+childframe) ; uses childframes for popups (Emacs 26+ only)
|
||||||
|
|
|
@ -63,6 +63,25 @@
|
||||||
(require 'helm-projectile)
|
(require 'helm-projectile)
|
||||||
(set-keymap-parent helm-projectile-find-file-map helm-map)
|
(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
|
;;; Helm hacks
|
||||||
(defun +helm*replace-prompt (plist)
|
(defun +helm*replace-prompt (plist)
|
||||||
"Globally replace helm prompts with `+helm-global-prompt'."
|
"Globally replace helm prompts with `+helm-global-prompt'."
|
||||||
|
|
|
@ -10,3 +10,5 @@
|
||||||
(package! helm-projectile)
|
(package! helm-projectile)
|
||||||
(package! helm-swoop)
|
(package! helm-swoop)
|
||||||
(package! wgrep)
|
(package! wgrep)
|
||||||
|
(when (and EMACS26+ (featurep! +childframe))
|
||||||
|
(package! posframe))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue