unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: JD Smith <jdtsmith@gmail.com>
Cc: 61373-done@debbugs.gnu.org
Subject: bug#61373: Eglot patch: add customization to prefer plaintext for :hover
Date: Thu, 23 Mar 2023 21:25:26 +0000	[thread overview]
Message-ID: <875yardut5.fsf@gmail.com> (raw)
In-Reply-To: <75664907-6B17-43AC-B372-724DA6E7BA42@gmail.com> (JD Smith's message of "Wed, 8 Feb 2023 16:33:16 -0500")

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





      parent reply	other threads:[~2023-03-23 21:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 21:33 bug#61373: Eglot patch: add customization to prefer plaintext for :hover JD Smith
     [not found] ` <handler.61373.B.167589201518565.ack@debbugs.gnu.org>
2023-02-15  2:37   ` bug#61373: Acknowledgement (Eglot patch: add customization to prefer plaintext for :hover) JD Smith
2023-03-23 21:25 ` João Távora [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yardut5.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=61373-done@debbugs.gnu.org \
    --cc=jdtsmith@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).