Add support for body background color

This commit is contained in:
Yuan Fu 2018-12-11 00:20:21 -05:00
parent 9a6c21b644
commit 75a2f7d06e
No known key found for this signature in database
GPG Key ID: 1CF5ECABEC37A901
2 changed files with 6 additions and 0 deletions

View File

@ -8,3 +8,5 @@ Get the file, add to load path, and
Show the documentation of the symbol at point: =eglot-doc-help-at-point=
Show documentation upon hover: =eglot-doc-hover-mode=. Note that you need to enable ElDoc mode for this to work.
Adjust =:background= of =eglot-doc-border= face for border color. Adjust =:background= of =eglot-doc-body= face for background color of childframe.

View File

@ -36,6 +36,9 @@
(((background light)) . (:background "dark")))
"The border color used in childframe.")
(defface eglot-doc-body '((t . (:background nil)))
"Body face used in eglot doc childframe. Only :background is used.")
(defvar eglot-doc-frame-parameters
'(
;; (left . -1)
@ -143,6 +146,7 @@ Checkout `lsp-ui-doc--make-frame', `lsp-ui-doc--move-frame'."
(set-window-dedicated-p window t)
(redirect-frame-focus frame (frame-parent frame))
(set-face-attribute 'internal-border frame :inherit 'eglot-doc-border)
(set-face-attribute 'default frame :background (face-attribute 'eglot-doc-body :background main-frame))
;; set size
(let* ((size
(window-text-pixel-size