]> git.eshelyaron.com Git - emacs.git/commit
Eglot: symbol highlighting now done in eldoc-documentation-functions
authorJoão Távora <joaotavora@gmail.com>
Fri, 24 Jan 2025 22:51:54 +0000 (22:51 +0000)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 Jan 2025 18:09:59 +0000 (19:09 +0100)
commitbc47cced6668da4a784ec0bf35a6fa9bc374defb
treee61b74b6cf911aadda499625bfd1a65698eb161b
parentf21d31455d1ebd5c9c32ba6de7ba7e6e5bdb60f8
Eglot: symbol highlighting now done in eldoc-documentation-functions

Even though highlighting the thing at point isn't really producing
documentation at point, theory and practice have shown that using
eldoc-documentation-functions for this is a feasible way to avoid
reimplementing all the idle timer logic for such functionality.

In fact, we were already using ElDoc for this purpose, but this commit
makes it so the new eglot-highlight-eldoc-function is a first class
citizen in eldoc-documentation-functions, so users can manipulate it if
so desired.

* lisp/progmodes/eglot.el (eglot--managed-mode): Use
eglot-highlight-eldoc-function
(eglot-hover-eldoc-function): Don't mix highlighting with hover.
(eglot-highlight-eldoc-function): Rename and rework from
eglot--highlight-piggyback

(cherry picked from commit 60166a419f601b413db86ddce186cc387e8ec269)
lisp/progmodes/eglot.el