emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make all tree-sitter modes optional


From: Eli Zaretskii
Subject: Re: Make all tree-sitter modes optional
Date: Thu, 16 Feb 2023 10:34:27 +0200

> Date: Thu, 16 Feb 2023 08:53:56 +0100
> From: Theodor Thornhill <theo@thornhill.no>
> CC: monnier@iro.umontreal.ca, acm@muc.de, juri@linkov.net, casouri@gmail.com,
>  larsi@gnus.org, jostein@secure.kjonigsen.net, emacs-devel@gnu.org
> 
> I'm thinking some devise like a "language layer", where major and minor modes 
> are pluggable.
> 
> Let's say you want to program in JavaScript.
> 
> Then you can for example do something like:
> 
> (make-language-layer 'js-layer
>   :major-mode 'js-ts-mode
>   :lsp 'eglot
>   :dagnostics 'flymake)
> 
> 
> Then
> 
> (add-to-list auto-mode-alist ".js" 'js-layer)
> 
> And so forth. In this case a person can swap out flymake for flycheck, eglot 
> for lsp-mode, js-ts-mode for js-mode etc. Then no implementation "owns" the 
> language namespace, and we hopefully don't step on anyone's toes.
> 
> What do you think?

I don't know yet.  We should definitely think about this more.  Emacs
never had more than a single major mode per programming language, so
for us "language" and "major mode" were always synonyms.  (Perl mode
and CPerl mode is the only exception I know of, and it did cause us
grief.)

So yes, this is a new situation that could call for some new concepts
in Emacs.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]