From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: Make all tree-sitter modes optional Date: Thu, 16 Feb 2023 08:53:56 +0100 Message-ID: References: <83o7rexe2n.fsf@gnu.org> <83h6x5xym7.fsf@gnu.org> <83h6wr6gmz.fsf@gnu.org> <868ri140sr.fsf@mail.linkov.net> <83fsc92gbz.fsf@gnu.org> <83cz6ccagy.fsf@gnu.org> <838rgzaqmj.fsf@gnu.org> <7bad77ae-a176-d49b-5115-dbadf7e6d1bc@yandex.ru> <3112fa15-8d1c-679a-f319-cf659b097be4@yandex.ru> <831qmq9jjr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26560"; mail-complaints-to="usenet@ciao.gmane.io" 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 To: Eli Zaretskii , Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 16 08:55:01 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSZ6a-0006ge-0n for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Feb 2023 08:55:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSZ65-0004lk-4V; Thu, 16 Feb 2023 02:54:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSZ5s-0004l9-EU for emacs-devel@gnu.org; Thu, 16 Feb 2023 02:54:17 -0500 Original-Received: from out-33.mta0.migadu.com ([91.218.175.33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSZ5p-0000tU-AM for emacs-devel@gnu.org; Thu, 16 Feb 2023 02:54:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1676534048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=076e0D0knO0W3BiVf+0VJNdO5eC7V3zJYWexcTuWWII=; b=uNr3pZCyf3DXu4YhV3sHGi5WbSPSptb5DzauTLsgHHSEzL1AqpAwij1E4NUfWNwZrD93Vb UFAPgEY9tk6wfoO0mKYCZu9wAyX1NntfhpiljhZIhvQkwO+GGz8hvTYYc6PEYoU+0Vbexn ekUxFtibBEvK9etN89Fi2v2/zFw7moz2kBZ0trMQIiuU6FF4cXLoLoZ5nnrlu5zxcX6xX8 rAfNXykDKFU74uaUBfTKdTXZBtHzXZww8PguXkakctboKkDbtR0qtTwwYzDSSMjHTWk5UF WpmPZOYqZviCBK9ENC5RwXkxUtESdRjQAShsMczuzwALZx2kMa1fippHI1fQ0g== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <831qmq9jjr.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=91.218.175.33; envelope-from=theo@thornhill.no; helo=out-33.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303374 Archived-At: On 16 February 2023 08:05:44 CET, Eli Zaretskii wrote: >> Date: Wed, 15 Feb 2023 22:24:49 +0200 >> Cc: Alan Mackenzie , Eli Zaretskii , >> juri@linkov=2Enet, casouri@gmail=2Ecom, larsi@gnus=2Eorg, theo@thornhi= ll=2Eno, >> jostein@secure=2Ekjonigsen=2Enet, emacs-devel@gnu=2Eorg >> From: Dmitry Gutov >>=20 >> On 15/02/2023 21:26, Stefan Monnier wrote: >> > OTOH we can expose&preload `c-ts--activate` and tell users to use >> >=20 >> > (cs-ts-activate) >>=20 >> A bunch of similar solutions have been proposed (global modes, etc; I= =20 >> can whip up one more in a few minutes as well), but they unfortunately= =20 >> failed to convince=2E > >Indeed, I'm still not convinced=2E We should decide based on user >reactions and requests once Emacs 29 is out=2E To me the last point here is the important one=2E We kinda "rushed" the mo= des in so that the treesit backend would have anything to show for in emacs= -29=2E We've tried many times to devise a mechanism for it to be unintrusiv= e, and definitely so for the cc mode equivalents=2E Yes they are far behind= them in some respects, so there was never a point to make them the default= for the foreseeable future=2E=20 Also remember that whatever mechanism we make now won't be part of Emacs 3= 0+, as there are clear shortcomings in all directions=2E Let's rather focus= on how we can improve the situation for Emacs 30=2E I'm thinking some devise like a "language layer", where major and minor mo= des are pluggable=2E Let's say you want to program in JavaScript=2E 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 "=2Ejs" 'js-layer) And so forth=2E In this case a person can swap out flymake for flycheck, e= glot for lsp-mode, js-ts-mode for js-mode etc=2E Then no implementation "ow= ns" the language namespace, and we hopefully don't step on anyone's toes=2E What do you think? Theo