This commits reverts part of
commit
e83c78b8c7784254c2c6f043530ab325c2fa7f16
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.
(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))