GNU bug report logs -
#61072
How to change the length of the separation lines in eldoc, used by eglot?
Previous Next
Reported by: Wei-Ting Lin <linwaytin <at> gmail.com>
Date: Thu, 26 Jan 2023 06:49:01 UTC
Severity: normal
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 61072 <at> debbugs.gnu.org (full text, mbox):
On Tue, Feb 21, 2023 at 5:11 PM Felician Nemeth
<felician.nemeth <at> gmail.com> wrote:
> So the LSP server sends "---\n". gfm-view-mode turns these three dashes
> into a long separation line, which is then displayed by eldoc-box.
> Neither gfm-view-mode nor eldoc-box is a part of Emacs or available from
> GNU ELPA. I'm therefore tempted to say that debbugs is not the right
> place for this bug report.
>
> However, when Eglot calls gfm-view-mode in eglot--format-markup the
> window-width probably equals to the width of the window containing the
> user's source code and eldoc-box seems to display the documentation in a
> narrower window. So maybe it would help if Eglot allowed the users to
> run a custom function instead of calling gfm-view-mode in
> eglot--format-markup.
Yes, I see the problem. Thanks for describing Felicián.
But I don't think your suggestion is the correct way to tackle it.
Rather, Eglot should add a markdown-capable element to
eldoc-display-functions and hint in the documentation item
produced by Eglot's eldoc-documentation-functions that that item
has a markdown version (it may also have a plaintext version
alongside), taken directly from the LSP source. The new function
would then render the item appropriately.
Then users and other modes such as eldoc-box can also add things to
eldoc-display functions, read the hints (if they support them)
and do whatever they think is more suitable with the rich/poor
documentation item.
This is in principle already fully supported by the ElDoc
infrastructure, but needs someone to experiment with it (and
potentially find limitations in ElDoc, which I can help plug).
João
This bug report was last modified 2 years and 104 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.