branch: externals/ivy-posframe
commit 5312e07686ecf2ab5877046ea263bb7645654a6a
Author: Feng Shu <[email protected]>
Commit: Feng Shu <[email protected]>
Add ivy-posframe-parameters
---
README.md | 41 ++++++++++++++++++++++++++++++-----------
ivy-posframe.el | 22 ++++++++++++++++++++--
2 files changed, 50 insertions(+), 13 deletions(-)
diff --git a/README.md b/README.md
index 296cb54..ad29c35 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,21 @@
# 目录
-1. [ivy-posframe README](#orgcc900c2)
- 1. [What is ivy-posframe](#org5f83be3)
- 2. [Display functions](#org24f03db)
- 3. [How to enable ivy-posframe](#orgcedf7a7)
- 4. [How to custom your ivy-posframe style](#org7b3c825)
+1. [ivy-posframe README](#org097ddbf)
+ 1. [What is ivy-posframe](#org670ef83)
+ 2. [Display functions](#org67ff507)
+ 3. [How to enable ivy-posframe](#orgd00569f)
+ 4. [Tips](#org326cf4c)
+ 1. [How to show fringe to ivy-posframe](#org3d2991d)
+ 2. [How to custom your ivy-posframe style](#orgbeec1d0)
-<a id="orgcc900c2"></a>
+<a id="org097ddbf"></a>
# ivy-posframe README
-<a id="org5f83be3"></a>
+<a id="org670ef83"></a>
## What is ivy-posframe
@@ -23,7 +25,7 @@ to show its candidate menu.
NOTE: ivy-posframe requires Emacs 26
-<a id="org24f03db"></a>
+<a id="org67ff507"></a>
## Display functions
@@ -39,7 +41,7 @@ NOTE: ivy-posframe requires Emacs 26

-<a id="orgcedf7a7"></a>
+<a id="orgd00569f"></a>
## How to enable ivy-posframe
@@ -64,9 +66,26 @@ NOTE: ivy-posframe requires Emacs 26
(push '(t . ivy-posframe-display) ivy-display-functions-alist)
-<a id="org7b3c825"></a>
+<a id="org326cf4c"></a>
-## How to custom your ivy-posframe style
+## Tips
+
+
+<a id="org3d2991d"></a>
+
+### How to show fringe to ivy-posframe
+
+ (setq ivy-posframe-extra-parameters
+ '((left-fringe . 10)
+ (right-fringe . 10)))
+
+By the way, User can set **any** parameters of ivy-posframe with
+the help of \`ivy-posframe-parameters'.
+
+
+<a id="orgbeec1d0"></a>
+
+### How to custom your ivy-posframe style
The simplest way is:
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 9f2d8bf..acadd9e 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -71,7 +71,19 @@
;; (push '(t . ivy-posframe-display) ivy-display-functions-alist)
;; #+END_EXAMPLE
-;; ** How to custom your ivy-posframe style
+;; ** Tips
+
+;; *** How to show fringe to ivy-posframe
+;; ;; #+BEGIN_EXAMPLE
+;; (setq ivy-posframe-extra-parameters
+;; '((left-fringe . 10)
+;; (right-fringe . 10)))
+;; ;; #+END_EXAMPLE
+
+;; By the way, User can set *any* parameters of ivy-posframe with
+;; the help of `ivy-posframe-parameters'.
+
+;; *** How to custom your ivy-posframe style
;; The simplest way is:
;; ;; #+BEGIN_EXAMPLE
@@ -102,6 +114,11 @@ When nil, Using current frame's font as fallback."
:group 'ivy-posframe
:type 'string)
+(defcustom ivy-posframe-parameters nil
+ "The frame parameters used by ivy-posframe."
+ :group 'ivy-posframe
+ :type 'string)
+
(defface ivy-posframe
'((t (:inherit default :background "#333333" :foreground "#dcdccc")))
"Face used by the ivy-posframe."
@@ -130,7 +147,8 @@ When nil, Using current frame's font as fallback."
:foreground-color (face-attribute 'ivy-posframe :foreground)
:height ivy-height
:min-height 10
- :min-width 50))))
+ :min-width 50
+ :override-parameters ivy-posframe-parameters))))
(defun ivy-posframe-display (str)
(let ((func (intern (format "ivy-posframe-display-at-%s"