From ea7251ad6dfe3cfbdcea221a67c7b7d4fcbfebfa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Wed, 22 Feb 2023 18:05:00 +0000 Subject: [PATCH] Eglot: go back to setting eldoc-documentation-strategy again MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This commits reverts part of commit e83c78b8c7784254c2c6f043530ab325c2fa7f16 Author: João Távora 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. --- lisp/progmodes/eglot.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index abc090aea51..54f44d41b0d 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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)) -- 2.39.2