emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61373: closed (Eglot patch: add customization to prefer plaintext fo


From: GNU bug Tracking System
Subject: bug#61373: closed (Eglot patch: add customization to prefer plaintext for :hover)
Date: Thu, 23 Mar 2023 21:24:02 +0000

Your message dated Thu, 23 Mar 2023 21:25:26 +0000
with message-id <875yardut5.fsf@gmail.com>
and subject line Re: bug#61373: Eglot patch: add customization to prefer 
plaintext for :hover
has caused the debbugs.gnu.org bug report #61373,
regarding Eglot patch: add customization to prefer plaintext for :hover
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
61373: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61373
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Eglot patch: add customization to prefer plaintext for :hover Date: Wed, 8 Feb 2023 16:33:16 -0500
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. 

Attachment: eglot_plaintext.patch
Description: Binary data



--- End Message ---
--- 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 ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]