From 75a2f7d06e63435b3065ffd125b8156f2910ef66 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 11 Dec 2018 00:20:21 -0500 Subject: [PATCH] Add support for body background color --- README.org | 2 ++ eglot-doc.el | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.org b/README.org index 36f7162..332ad8f 100644 --- a/README.org +++ b/README.org @@ -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. diff --git a/eglot-doc.el b/eglot-doc.el index 5ad42f8..01b97e0 100644 --- a/eglot-doc.el +++ b/eglot-doc.el @@ -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