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 #41 received at 61072 <at> debbugs.gnu.org (full text, mbox):
João Távora <joaotavora <at> gmail.com> writes:
> See docstring of eldoc-documentation-functions.
The docstring is quite easy to follow. Nice work.
> I stopped short of adding :content-type there. There's not much point
> in moving rendering from Eglot to ElDoc if the rendering is going to
> suck just as bad. So I think this has to be analyzed carefully. Here
> are some ideas:
>
> 1. Use eww to render HTML, as you suggest. But how to get that HTML?
> Call an external process?
My idea was to leave the door open for a potential ElDoc backend that
produces raw HTML documentation. But it is a half-backed idea. I don't
know how images should be specified. Just as an IMG tag: <img
src="example.jpg">. Or inline like in an email.
If I understood correctly, one of your original ideas was to let ElDoc
backends (Eglot) to specify a flag whether the documentation was in
markdown format. Using terminology of the
eldoc-documentation-functions, I simply suggested a :content-type key to
generalize the markdown flag hoping Emacs had helper functions to help
handling a content-type specification.
Unfortunately, I now see a small problem with the :content-type
approach. How should Eglot know whether ElDoc can render a markdown
formatted documentation? If Eglot can request the documentation in
multiple formats, how it should know which one to choose.
> 2. You seem to suggest that eww can render markdown directly. Sure?
This is a misunderstanding. I didn't intend to suggest that.
> 3. Lobby for markdown.el to become more render-friendly, (remove hard
> newlines from paragraphs, remove invisible text, etc.)
Sure, but can a better markdown.el solve the original issue? Is there a
way to render a separation line independently of the current
window-width?
> 4. Make a new Markdown mode based on a tree-sitter grammar
I think a simple mode just to view a markdown document would be useful.
However, tree-sitter only helps parse a document. Turning an abstract
syntax tree into a viewable Emacs buffer is still a substantial work, I
suppose.
Felicián
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.