GNU bug report logs -
#68246
30.0.50; Add non-TS mode as extra parent of TS modes
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Thu, 4 Jan 2024 22:12:01 UTC
Severity: wishlist
Found in version 30.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Tue, Jan 9, 2024 at 3:55 AM Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
> The mapping from "language" to major mode can't be always reversible, so
> `major-mode-remap-alist` works to map "language" to "major-mode" but not
> the other way.
>
> The current bug-report *is* about "finding the language" but the code
> that needs that info luckily doesn't need "the language"
I must be out of luck, because Eglot does need "the language" to send
as the LSP "languageID" to the server.
> which I propose to solve with `derived-mode-p`, since
> that's what we've been using all these years.
Even before your patch and before TS modes, derived-mode-p leads
to exposing Eglot users looking to customize eglot-server-programs to
much more complicated concepts.
If I could reliably write `get-language-for-mode`, this is much closer to
what they are really after:
(ocaml "ocamllsp")
(reason "ocamllsp")
Instead of
(((caml-mode :language-id "ocaml")
(tuareg-mode :language-id "ocaml") reason-mode) . ("ocamllsp"))
which is what is currently found in the Eglot database. In fact
even if LSP languageID wasn't a thing, I still think it's easier to
customize on those terms.
It's also a fair bit simpler to. And it'd be much simpler for
Yasnippet too.
João
This bug report was last modified 1 year 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.