[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d69d0b1a296 03/10: Eglot: declare support for markdown also for s
From: |
João Távora |
Subject: |
master d69d0b1a296 03/10: Eglot: declare support for markdown also for signatures |
Date: |
Sun, 2 Apr 2023 19:15:39 -0400 (EDT) |
branch: master
commit d69d0b1a296c17508663afc9d0301b8ccaa7115e
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Eglot: declare support for markdown also for signatures
* lisp/progmodes/eglot.el
(eglot--accepted-formats): new helper.
(eglot-client-capabilities): use it.
---
lisp/progmodes/eglot.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 3458fbc7cb2..8e47c397ca8 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -452,6 +452,10 @@ This can be useful when using docker to run a language
server.")
(if (>= emacs-major-version 27) (executable-find command remote)
(executable-find command)))
+(defun eglot--accepted-formats ()
+ (if (and (not eglot-prefer-plaintext) (fboundp 'gfm-view-mode))
+ ["markdown" "plaintext"] ["plaintext"]))
+
;;; Message verification helpers
;;;
@@ -782,15 +786,12 @@ treated as in `eglot--dbind'."
:tagSupport (:valueSet [1]))
:contextSupport t)
:hover (list :dynamicRegistration :json-false
- :contentFormat
- (if (and (not eglot-prefer-plaintext)
- (fboundp 'gfm-view-mode))
- ["markdown" "plaintext"]
- ["plaintext"]))
+ :contentFormat
(eglot--accepted-formats))
:signatureHelp (list :dynamicRegistration :json-false
:signatureInformation
`(:parameterInformation
(:labelOffsetSupport t)
+ :documentationFormat
,(eglot--accepted-formats)
:activeParameterSupport t))
:references `(:dynamicRegistration :json-false)
:definition (list :dynamicRegistration :json-false
- master updated (093a360251a -> f886ae5cf07), João Távora, 2023/04/02
- master d00e05daa96 04/10: Eglot: take advantage of new Eldoc options for signature doc, João Távora, 2023/04/02
- master a8c1559a663 01/10: Eglot: remove hacky advice of jsonrpc-request, João Távora, 2023/04/02
- master ad1efe5e675 05/10: Eglot: improve caching in eglot-completion-at-point, João Távora, 2023/04/02
- master 66c48f9e46a 02/10: Eglot: define eglot--ensure-list with defalias, João Távora, 2023/04/02
- master 87f025117b8 08/10: ; Eldoc: fix doc of e-d-functions w.r.t. :origin keyword, João Távora, 2023/04/02
- master f886ae5cf07 10/10: ; * etc/EGLOT-NEWS (Upcoming 1.14): Update., João Távora, 2023/04/02
- master bdb400912e0 06/10: Eglot: load built-in GNU ELPA dependencies explicitly, João Távora, 2023/04/02
- master f2357df91f0 09/10: Eldoc: bump package version to 1.14.0, João Távora, 2023/04/02
- master ecf53a50037 07/10: ; Eglot: removed unused dependency on 'array.el', João Távora, 2023/04/02
- master d69d0b1a296 03/10: Eglot: declare support for markdown also for signatures,
João Távora <=