emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 ea7251ad6df 1/2: Eglot: go back to setting eldoc-documentation-


From: João Távora
Subject: emacs-29 ea7251ad6df 1/2: Eglot: go back to setting eldoc-documentation-strategy again
Date: Wed, 22 Feb 2023 13:31:07 -0500 (EST)

branch: emacs-29
commit ea7251ad6dfe3cfbdcea221a67c7b7d4fcbfebfa
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Eglot: go back to setting eldoc-documentation-strategy again
    
    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.
---
 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]