Eglot's rendering of Markdown is imperfect and based on gfm-view-mode.
To make it slightly better, don't send invisible text in
eglot-hover-eldoc-function.
* lisp/progmodes/eglot.el (eglot--format-markup): Hide invisible text.
(setq-local markdown-fontify-code-blocks-natively t)
(insert string)
(let ((inhibit-message t)
- (message-log-max nil))
- (ignore-errors (delay-mode-hooks (funcall mode))))
- (font-lock-ensure)
- (string-trim (buffer-string)))))
+ (message-log-max nil)
+ match)
+ (ignore-errors (delay-mode-hooks (funcall mode)))
+ (font-lock-ensure)
+ (goto-char (point-min))
+ (while (setq match (text-property-search-forward 'invisible))
+ (delete-region (prop-match-beginning match)
+ (prop-match-end match)))
+ (string-trim (buffer-string))))))
(define-obsolete-variable-alias 'eglot-ignored-server-capabilites
'eglot-ignored-server-capabilities "1.8")