]> git.eshelyaron.com Git - emacs.git/commit
Delegate "hover" and "signature" doc synchronization efforts to eldoc
authorJoão Távora <joaotavora@gmail.com>
Wed, 3 Jun 2020 17:40:58 +0000 (18:40 +0100)
committerJoão Távora <joaotavora@gmail.com>
Thu, 9 Jul 2020 10:41:25 +0000 (11:41 +0100)
commit8afdc3d2d16139c2be5d17588d0741861cb294cc
tree04cd7807dd5ddc232e99b6e7eb2486efe1b647a4
parent29dbbcc185471136a8dc874619dbf8f2ffba8fa6
Delegate "hover" and "signature" doc synchronization efforts to eldoc

Uses Eldoc's eldoc-documentation-functions variable.  In Eldoc v1.0.0
that variable was already available as a way of handling/composing
multiple docstrings from different sources, but it didn't work
practically with mutiple concurrent async sources.  This was fixed in
1.1.0, which Eglot now requires.

This fixes the synchronization problems reported in https://github.com/joaotavora/eglot/issues/494 and also
issue https://github.com/joaotavora/eglot/issues/439.  It is likely that some of the exact doc-composing
functionality in Eglot, (developed during those issues) was lost, and
has to be remade, quite likely in Eldoc itself.

Flymake is now also an Eldoc producer, and therefore the problems of
github issues https://github.com/joaotavora/eglot/issues/481 and https://github.com/joaotavora/eglot/issues/454 will also soon be fixed as soon as Eglot
starts using the upcoming Flymake 1.0.9.

* NEWS.md: New entry.

* README.md (eglot-put-doc-in-help-buffer)
(eglot-auto-display-help-buffer):  Remove mention to these options.

* eglot.el
(Package-Requires:) Require eldoc.el 1.1.0.
(eglot--when-live-buffer): Rename from eglot--with-live-buffer.
(eglot--when-buffer-window): New macro.
(eglot--after-change, eglot--on-shutdown, eglot-ensure): Use eglot--when-live-buffer.
(eglot--managed-mode): Use eglot-documentation-functions and eldoc-documentation-strategy.
(eglot--highlights): Move down.
(eglot-signature-eldoc-function, eglot-hover-eldoc-function)
(eglot--highlight-piggyback):  New eldoc functions.
(eglot--help-buffer, eglot--update-doc)
(eglot-auto-display-help-buffer, eglot-put-doc-in-help-buffer)
(eglot--truncate-string, eglot-doc-too-large-for-echo-area)
(eglot-help-at-point): Remove all of this.
(eglot--apply-workspace-edit): Call eldoc manually after an edit.
(eglot-mode-map): Remap display-local-help to eldoc-doc-buffer
lisp/progmodes/eglot.el