--- Begin Message ---
Subject: |
Re: bug#61373: Eglot patch: add customization to prefer plaintext for :hover |
Date: |
Thu, 23 Mar 2023 21:25:26 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
JD Smith <jdtsmith@gmail.com> writes:
> Some LSP servers badly mangle their responses to :hover into markdown that
> gfm-viewmode cannot render. See this
> discussion, for example.
>
> The attached patch adds a new custom option `eglot-prefer-plaintext’ which
> configures the server to use plaintext for :
> hover responses, even if Emacs could in principle handle markdown.
> Unfortunately, the popular Python LSP server in
> question (pyright) is not interested in improvement to its generated markdown
> (since it "works in VS-Code”). Luckily the
> plaintext docstrings of most packages are very nicely formatted.
Hi,
I've pushed your patch to master:
commit 4566a0c6b825a18e6c065da0543b8b942b7db8df (HEAD -> master, origin/master,
origin/HEAD)
Author: JD Smith <jdtsmith@gmail.com>
Date: Thu Mar 23 17:43:52 2023 +0000
Eglot: let user opt-in to plaintext LSP docs (bug#61373)
* lisp/progmodes/eglot.el
(eglot-prefer-plaintext): New variable.
(eglot-client-capabilities): Use it.
Copyright-paperwork-exempt: yes
I opted noted not to describe eglot-prefer-plaintext in the manual,
because I think this option should ultimately live in ElDoc, not in
Eglot. Properly supporting markdown rendering in Eldoc is hard though,
so there's little reason not to push this simple workaround.
Closing this bug. See also bug#61072 and bug#62029 for more discussion.
João
--- End Message ---