GNU bug report logs -
#61373
Eglot patch: add customization to prefer plaintext for :hover
Previous Next
Reported by: JD Smith <jdtsmith <at> gmail.com>
Date: Wed, 8 Feb 2023 21:34:01 UTC
Severity: normal
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61373 in the body.
You can then email your comments to 61373 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61373
; Package
emacs
.
(Wed, 08 Feb 2023 21:34:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
JD Smith <jdtsmith <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 08 Feb 2023 21:34:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Some LSP servers badly mangle their responses to :hover into markdown that gfm-viewmode cannot render. See this discussion <https://github.com/joaotavora/eglot/discussions/1039>, 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.
[Message part 2 (text/html, inline)]
[eglot_plaintext.patch (application/octet-stream, attachment)]
[Message part 4 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61373
; Package
emacs
.
(Wed, 15 Feb 2023 02:38:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 61373 <at> debbugs.gnu.org (full text, mbox):
Copying in João.
Reply sent
to
João Távora <joaotavora <at> gmail.com>
:
You have taken responsibility.
(Thu, 23 Mar 2023 21:24:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
JD Smith <jdtsmith <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 23 Mar 2023 21:24:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 61373-done <at> debbugs.gnu.org (full text, mbox):
JD Smith <jdtsmith <at> 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 <at> 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
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 21 Apr 2023 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.