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: Theodor Thornhill
Subject: Re: Make all tree-sitter modes optional
Date: Thu, 16 Feb 2023 15:48:24 +0100

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 16/02/2023 09:53, Theodor Thornhill wrote:
>> To me the last point here is the important one. We kinda "rushed" the modes 
>> in so that the treesit backend would have anything to show for in emacs-29. 
>> We've tried many times to devise a mechanism for it to be unintrusive, and 
>> definitely so for the cc mode equivalents. Yes they are far behind them in 
>> some respects, so there was never a point to make them the default for the 
>> foreseeable future.
>
> Nobody is arguing about whether the modes should be default at the moment.
>
>> (make-language-layer 'js-layer
>>    :major-mode 'js-ts-mode
>>    :lsp 'eglot
>>    :dagnostics 'flymake)
>
> If we do something like that, I'd rather we try for a scheme where we 
> don't need to enumerate the "swappable" features in advance -- aside 
> from the major mode, of course. But Eglot and friends plug into a 
> language through indirection.
>
> Other than that, the user still needs to 'M-x eglot' or 'M-x lsp', or 
> enable global-flycheck-mode, so the declarations like above seem redundant.
>
> To clarify, the example above looks nice, but there are a lot more 
> programming related minor modes than the LSP clients and Flymake/Flycheck.

Yeah, absolutely.  This was just an example written on my phone in a
hurry.  My point is simply that from a users perspective you'd want the
whole "ide" experience many times, but not necessarily always, and some
construct like this would allow for that.  In addition, a user opening a
project in a language never used before may be pleasantly surprised to
see diagnostics, autocomplete etc without setup, at least after an
optional "enable language layer for Rust? [yn]" or something like that.

and sure, there are many things that should be added, :completions,
:project etc, where settings could be company, corfu, project could be
project.el or projectile and so forth.  And obviously some :finally that
runs an arbitrary form of sorts. Maybe?

Theo



reply via email to

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