* eglot.el (eglot-client-capabilities): annouce markdown support for hover.
(eglot--format-markup): Format hover info with Markdown.
Fixes: https://github.com/joaotavora/eglot/issues/328
Copyright-paperwork-exempt: yes
GitHub-reference: https://github.com/joaotavora/eglot/issues/329
t
:json-false))
:contextSupport t)
- :hover `(:dynamicRegistration :json-false)
+ :hover (list :dynamicRegistration :json-false
+ :contentFormat ["markdown" "plaintext"])
:signatureHelp (list :dynamicRegistration :json-false
:signatureInformation
`(:parameterInformation
(if (stringp markup) (list (string-trim markup)
(intern "gfm-view-mode"))
(list (plist-get markup :value)
- major-mode))))
+ (pcase (plist-get markup :kind)
+ ("markdown" 'gfm-view-mode)
+ (_ major-mode))))))
(with-temp-buffer
(insert string)
(ignore-errors (delay-mode-hooks (funcall mode)))