1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

Eglot: go back to setting eldoc-documentation-strategy again

This commits reverts part of

   commit e83c78b8c7
   Author: João Távora <joaotavora@gmail.com>
   Date:   Mon Feb 20 22:43:50 2023 +0000

       Eglot: respect user's Eldoc configuration by default

In that commit, I did what many longstanding issues and users were
suggesting and removed Eglot's override of two Eldoc user
configuration varibles.

I verified that Eglot's behaviour would stay mostly unaltered but my
tests were very incomplete.  In short there is no way that Eglot can
work acceptably with the default setting of
'eldoc-documentation-strategy', which is
'eldoc-documentation-default'.  So it must be changed, either globally
or locally in Eglot's minor mode.

This is true for any situation where both synchronous and asynchronous
documentation sources are present.  In Eglot's case there are two
asynchronous sources which have more importance than the synchronous
source.  So any other strategy except the
'eldoc-documentation-default' makes sense.

* lisp/progmodes/eglot.el (eglot--managed-mode): Set
eldoc-documentation-strategy to eldoc-documentation-compose.
This commit is contained in:
João Távora 2023-02-22 18:05:00 +00:00
parent 6016f1982d
commit ea7251ad6d

View File

@ -1764,6 +1764,8 @@ Use `eglot-managed-p' to determine if current buffer is managed.")
(eglot--setq-saving flymake-diagnostic-functions '(eglot-flymake-backend))
(eglot--setq-saving company-backends '(company-capf))
(eglot--setq-saving company-tooltip-align-annotations t)
(eglot--setq-saving eldoc-documentation-strategy
#'eldoc-documentation-compose)
(unless (eglot--stay-out-of-p 'imenu)
(add-function :before-until (local 'imenu-create-index-function)
#'eglot-imenu))