Conform helm posframe code to Doom conventions
This commit is contained in:
parent
a3915dfc91
commit
8f673f52fc
1 changed files with 18 additions and 20 deletions
|
@ -53,25 +53,6 @@
|
||||||
(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'."
|
||||||
|
@ -161,7 +142,24 @@
|
||||||
|
|
||||||
(def-package! posframe
|
(def-package! posframe
|
||||||
:when (and EMACS26+ (featurep! +childframe))
|
:when (and EMACS26+ (featurep! +childframe))
|
||||||
:after helm)
|
: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))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue