]> git.eshelyaron.com Git - emacs.git/commitdiff
Define a face for symbol highlight
authorAugusto Stoffel <arstoffel@gmail.com>
Wed, 13 Jan 2021 18:41:10 +0000 (19:41 +0100)
committerGitHub <noreply@github.com>
Wed, 13 Jan 2021 18:41:10 +0000 (18:41 +0000)
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

index f843c2dba6536cb1642c14234ca2521d49e90618..6d51fc74fc29d3e8b3e429644f9706ab1bd05370 100644 (file)
@@ -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))))