Eglot: don't send invisible text to Eldoc
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.
This commit is contained in:
parent
67c1e6e89c
commit
fe8af4eb30
1 changed files with 9 additions and 4 deletions
|
@ -1653,10 +1653,15 @@ Doubles as an indicator of snippet support."
|
|||
(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")
|
||||
|
|
Loading…
Add table
Reference in a new issue