Turn defvars to defcustoms for the documentation variables
* eldoc-box.el (eldoc-box-only-multi-line, eldoc-box-cleanup-interval, eldoc-box-clear-with-C-g, eldoc-box-max-pixel-width, eldoc-box-max-pixel-height, eldoc-box--inhibit-childframe): Turn into custom options.
This commit is contained in:
parent
d4574ee392
commit
4e81912d9b
35
eldoc-box.el
35
eldoc-box.el
@ -53,18 +53,21 @@
|
||||
(defface eldoc-box-body '((t . (:background nil)))
|
||||
"Body face used in eglot doc childframe.")
|
||||
|
||||
(defvar eldoc-box-only-multi-line nil
|
||||
"If non-nil, only use childframe when there are more than one line.")
|
||||
(defcustom eldoc-box-only-multi-line nil
|
||||
"If non-nil, only use childframe when there are more than one line."
|
||||
:type 'boolean)
|
||||
|
||||
(defvar eldoc-box-cleanup-interval 1
|
||||
(defcustom eldoc-box-cleanup-interval 1
|
||||
"After this amount of seconds will eldoc-box attempt to cleanup the childframe.
|
||||
E.g. if it is set to 1, the childframe is cleared 1 second after
|
||||
you moved the point to somewhere else (that doesn't have a doc to show).
|
||||
This doesn't apply to `eldoc-box-hover-at-point-mode',
|
||||
in that mode the childframe is cleared as soon as point moves.")
|
||||
in that mode the childframe is cleared as soon as point moves."
|
||||
:type 'number)
|
||||
|
||||
(defvar eldoc-box-clear-with-C-g nil
|
||||
"If set to non-nil, eldoc-box clears childframe when you hit \C-g.")
|
||||
(defcustom eldoc-box-clear-with-C-g nil
|
||||
"If set to non-nil, eldoc-box clears childframe when you hit \C-g."
|
||||
:type 'boolean)
|
||||
|
||||
(defvar eldoc-box-frame-parameters
|
||||
'(;; make the childframe unseen when first created
|
||||
@ -97,25 +100,28 @@ in that mode the childframe is cleared as soon as point moves.")
|
||||
(desktop-dont-save . t))
|
||||
"Frame parameters used to create the frame.")
|
||||
|
||||
(defvar eldoc-box-max-pixel-width 800
|
||||
(defcustom eldoc-box-max-pixel-width 800
|
||||
"Maximum width of doc childframe in pixel.
|
||||
Consider your machine's screen's resolution when setting this variable.
|
||||
Set it to a function with no argument
|
||||
if you want to dynamically change the maximum width.")
|
||||
if you want to dynamically change the maximum width."
|
||||
:type 'number)
|
||||
|
||||
(defvar eldoc-box-max-pixel-height 700
|
||||
(defcustom eldoc-box-max-pixel-height 700
|
||||
"Maximum height of doc childframe in pixel.
|
||||
Consider your machine's screen's resolution when setting this variable.
|
||||
Set it to a function with no argument
|
||||
if you want to dynamically change the maximum height.")
|
||||
if you want to dynamically change the maximum height."
|
||||
:type 'number)
|
||||
|
||||
(defvar eldoc-box-position-function #'eldoc-box--default-upper-corner-position-function
|
||||
"Eldoc-box uses this function to set childframe's position.
|
||||
This should be a function that returns a (X . Y) cons cell.
|
||||
It will be passes with two arguments: WIDTH and HEIGHT of the childframe.")
|
||||
|
||||
(defvar eldoc-box-fringe-use-same-bg t
|
||||
"T means fringe's background color is set to as same as that of default.")
|
||||
(defcustom eldoc-box-fringe-use-same-bg t
|
||||
"T means fringe's background color is set to as same as that of default."
|
||||
:type 'boolean)
|
||||
|
||||
(defvar eldoc-box-buffer-hook nil
|
||||
"Hook run after buffer for doc is setup.
|
||||
@ -125,9 +131,10 @@ Run inside the new buffer.")
|
||||
"Hook run after doc frame is setup but just before it is made visible.
|
||||
Each function runs inside the new frame and receives the main frame as argument.")
|
||||
|
||||
(defvar eldoc-box-self-insert-command-list '(self-insert-command outshine-self-insert-command)
|
||||
(defcustom eldoc-box-self-insert-command-list '(self-insert-command outshine-self-insert-command)
|
||||
"Commands in this list are considered self-insert-command by eldoc-box.
|
||||
See `eldoc-box-inhibit-display-when-moving'.")
|
||||
See `eldoc-box-inhibit-display-when-moving'."
|
||||
:type '(repeat symbol))
|
||||
|
||||
;;;;; Function
|
||||
(defvar eldoc-box--inhibit-childframe nil
|
||||
|
Loading…
Reference in New Issue
Block a user