forked from Github/emacs
Eglot: declare support for markdown also for signatures
* lisp/progmodes/eglot.el (eglot--accepted-formats): new helper. (eglot-client-capabilities): use it.
This commit is contained in:
parent
66c48f9e46
commit
d69d0b1a29
1 changed files with 6 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue