Subject: bug#61373: Eglot patch: add customization to prefer plaintext for :hover

From: JD Smith <[email-masked]>
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 <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.