Add new variable eldoc-box-fringe-use-same-bg
This commit is contained in:
parent
61dd07f670
commit
6caf8a2710
@ -21,6 +21,8 @@ Get the file, add to load path, and
|
|||||||
- =eldoc-box-max-pixel-width= & =eldoc-box-max-pixel-height= :: Set them according to the screen resolution of your machine.
|
- =eldoc-box-max-pixel-width= & =eldoc-box-max-pixel-height= :: Set them according to the screen resolution of your machine.
|
||||||
- =eldoc-box-only-multi-line= :: Set this to non-nil and eldoc-box only display multi-line message in childframe. One line messages are left in minibuffer.
|
- =eldoc-box-only-multi-line= :: Set this to non-nil and eldoc-box only display multi-line message in childframe. One line messages are left in minibuffer.
|
||||||
- =eldoc-box-cleanup-interval= :: 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.
|
- =eldoc-box-cleanup-interval= :: 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.
|
||||||
|
- =eldoc-box-fringe-use-same-bg= :: T means fringe's background color is set to as same as that of default. Default to t.
|
||||||
|
|
||||||
** Use with eglot
|
** Use with eglot
|
||||||
As of writing this README, eglot doesn't have a public mode hook, use this hook:
|
As of writing this README, eglot doesn't have a public mode hook, use this hook:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
@ -113,6 +113,9 @@ if you want to dynamically change the maximum height.")
|
|||||||
This should be a function that returns a (X . Y) cons cell.
|
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.")
|
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.")
|
||||||
|
|
||||||
;;;;; Function
|
;;;;; Function
|
||||||
(defvar eldoc-box--frame nil ;; A backstage variable
|
(defvar eldoc-box--frame nil ;; A backstage variable
|
||||||
"The frame to display doc.")
|
"The frame to display doc.")
|
||||||
@ -257,13 +260,16 @@ Checkout `lsp-ui-doc--make-frame', `lsp-ui-doc--move-frame'."
|
|||||||
(setq window (display-buffer-in-child-frame
|
(setq window (display-buffer-in-child-frame
|
||||||
buffer
|
buffer
|
||||||
`((child-frame-parameters . ,parameter))))
|
`((child-frame-parameters . ,parameter))))
|
||||||
(setq frame (window-frame window)))
|
(setq frame (window-frame window))
|
||||||
|
(when eldoc-box-fringe-use-same-bg
|
||||||
|
(set-face-attribute 'fringe frame :background nil :inherit 'default)))
|
||||||
(set-window-dedicated-p window t)
|
(set-window-dedicated-p window t)
|
||||||
(redirect-frame-focus frame (frame-parent frame))
|
(redirect-frame-focus frame (frame-parent frame))
|
||||||
(set-face-attribute 'internal-border frame :inherit 'eldoc-box-border)
|
(set-face-attribute 'internal-border frame :inherit 'eldoc-box-border)
|
||||||
(set-face-attribute 'default frame
|
(set-face-attribute 'default frame
|
||||||
:background (face-attribute 'eldoc-box-body :background main-frame)
|
:background (face-attribute 'eldoc-box-body :background main-frame)
|
||||||
:font (face-attribute 'eldoc-box-body :font main-frame))
|
:font (face-attribute 'eldoc-box-body :font main-frame))
|
||||||
|
|
||||||
;; set size
|
;; set size
|
||||||
(let* ((size
|
(let* ((size
|
||||||
(window-text-pixel-size
|
(window-text-pixel-size
|
||||||
|
Loading…
Reference in New Issue
Block a user