GNU bug report logs - #77856
31.0.50; Add markdown-ts-mode support to eglot/eldoc

Previous Next

Package: emacs;

Reported by: Rahul Martim Juliato <rahuljuliato <at> gmail.com>

Date: Thu, 17 Apr 2025 00:09:01 UTC

Severity: normal

Found in version 31.0.50

Full log


Message #11 received at 77856 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Rahul Martim Juliato <rahuljuliato <at> gmail.com>, 77856 <at> debbugs.gnu.org
Subject: Re: bug#77856: 31.0.50; Add markdown-ts-mode support to eglot/eldoc
Date: Fri, 18 Apr 2025 15:35:28 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Instead of relying on this workaround, would it be possible to support
>> `markdown-ts-mode` (or optionally `gfm-view-mode`) within
>> `eglot--format-markup` directly? This could be an opt-in feature for
>> users who prefer either mode for viewing Markdown content.

I'm interested in adding markdown-ts-mode support to Eglot (not only to
the Eglot->Eldoc interface but potentially also to the Eglot->Company
interface).

So a patch is welcome.  There is already a customization option
eglot-prefer-plaintext so no additional opt-in/out logic is required or
desired.  If that variable is nil the order should be:

-> Use markdown-ts-mode if it is available.
-> Use markdown-mode.el's gfm-view-mode if it is available
-> Go with plaintext as is done down.

It's important to keep in mind that Eglot works in Emacs versions as far
back as 26.3 and it should stay that way unless there's good reason to
break it.

An fboundp check should be enough.  The change is easiest if you first
replace all eglot.el's use of `gfm-view-mode' with an argless call to a
new symbol-returning helper function called
eglot--markdown-renderer-mode, for example.

An etc/EGLOT-NEWS entry should accompany the change.

>> Thanks for considering!

Good luck and thanks in advance!

João




This bug report was last modified 51 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.