From 2abd7be6b3e23b6fb9ef424352cdfb54496a1b47 Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Wed, 13 Jan 2021 19:41:10 +0100 Subject: [PATCH] Define a face for symbol highlight Also per https://github.com/joaotavora/eglot/issues/583. * eglot.el (eglot-highlight-symbol-face): New face. (eglot--highlight-piggyback): Use it. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/584 --- lisp/progmodes/eglot.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index f843c2dba65..6d51fc74fc2 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -166,6 +166,10 @@ of those modes. CONTACT can be: should not ask the user for any input, and return nil or signal an error if it can't produce a valid CONTACT.") +(defface eglot-highlight-symbol-face + '((t (:inherit bold))) + "Face used to highlight the symbol at point.") + (defface eglot-mode-line '((t (:inherit font-lock-constant-face :weight bold))) "Face for package-name in EGLOT's mode line.") @@ -2367,7 +2371,7 @@ is not active." (pcase-let ((`(,beg . ,end) (eglot--range-region range))) (let ((ov (make-overlay beg end))) - (overlay-put ov 'face 'highlight) + (overlay-put ov 'face 'eglot-highlight-symbol-face) (overlay-put ov 'evaporate t) ov))) highlights)))) -- 2.39.2