emacs-diffs
[Top][All Lists]
Advanced

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

master 4566a0c6b82 7/7: Eglot: let user opt-in to plaintext LSP docs (bu


From: João Távora
Subject: master 4566a0c6b82 7/7: Eglot: let user opt-in to plaintext LSP docs (bug#61373)
Date: Thu, 23 Mar 2023 17:17:42 -0400 (EDT)

branch: master
commit 4566a0c6b825a18e6c065da0543b8b942b7db8df
Author: JD Smith <jdtsmith@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Eglot: let user opt-in to plaintext LSP docs (bug#61373)
    
    * lisp/progmodes/eglot.el
    (eglot-prefer-plaintext): New variable.
    (eglot-client-capabilities): Use it.
    
    Copyright-paperwork-exempt: yes
---
 lisp/progmodes/eglot.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index fae1c8db8b7..806e498c38c 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -391,6 +391,10 @@ done by `eglot-reconnect'."
   "If non-nil, activate Eglot in cross-referenced non-project files."
   :type 'boolean)
 
+(defcustom eglot-prefer-plaintext nil
+  "If non-nil, always request plaintext responses to hover requests."
+  :type 'boolean)
+
 (defcustom eglot-menu-string "eglot"
   "String displayed in mode line when Eglot is active."
   :type 'string)
@@ -776,7 +780,8 @@ treated as in `eglot--dbind'."
                                     :contextSupport t)
              :hover              (list :dynamicRegistration :json-false
                                        :contentFormat
-                                       (if (fboundp 'gfm-view-mode)
+                                       (if (and (not eglot-prefer-plaintext)
+                                                (fboundp 'gfm-view-mode))
                                            ["markdown" "plaintext"]
                                          ["plaintext"]))
              :signatureHelp      (list :dynamicRegistration :json-false



reply via email to

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