gfm-mode is read-only, so it must be set after the string has been
inserted in the temporary buffer.
* eglot.el (eglot--format-markup): Insert string before setting
mode.
GitHub-reference: close https://github.com/joaotavora/eglot/issues/197
(list (plist-get markup :value)
major-mode))))
(with-temp-buffer
- (ignore-errors (funcall mode))
- (insert string) (font-lock-ensure) (buffer-string))))
+ (insert string)
+ (ignore-errors (funcall mode)) (font-lock-ensure) (buffer-string))))
(defcustom eglot-ignored-server-capabilites (list)
"LSP server capabilities that Eglot could use, but won't.