From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Turing on tree-sitter (was: Call for volunteers: add tree-sitter support to major modes) Date: Mon, 10 Oct 2022 11:19:18 +0300 Message-ID: <831qrghz09.fsf@gnu.org> References: <83czb1jrm3.fsf@gnu.org> <87v8ot2nfi.fsf@posteo.net> <837d19jfia.fsf@gnu.org> <83edvgi3mx.fsf@gnu.org> <87r0zg5g76.fsf@thornhill.no> <78205E8D-B2D4-4460-BE0A-9BF7C627A79B@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31976"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theo@thornhill.no, philipk@posteo.net, emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 10 10:26:43 2022 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 1oho7W-00084t-EK for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 10:26:42 +0200 Original-Received: from localhost ([::1]:52932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oho7V-0004kh-Ap for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 04:26:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oho0H-0006Gg-LX for emacs-devel@gnu.org; Mon, 10 Oct 2022 04:19:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oho0H-0000Rk-5r; Mon, 10 Oct 2022 04:19:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Olut8JJJW0iCfZOnp45RNwHwKEESfnuz6TmS3HVYxA8=; b=j2gWJYvao9Oi FDYIHfHNONXEn1DBA7GZgHZwRgHv8mB0d+TlPjqbHcFOxEY14sQFF6Q9rMZ+QUmsw70O22ib9bf2h uW2o7fK6pOq/ARJwvm4omt5pCMt3NXXx0A8YO3sSVwYNrl53d4rQT/MSDIjqIHgprLYLaaidwe699 VCpO15dmcjzoi3uDjwef0OoHdRZEaGkO4QChjuVfXJx4jYF/oHdBFvDwR9cdPKyww86TIUcIUc8Dh FkR0iHHuOH0lGX2P+dfrDoxQ4VbP0MRC0Lzaq62FjEFyDeD80oqhb855Fo/qFfaTV68+lIPqF2sRs BSa5Mxxr6DlZHA9aaIk/xg==; Original-Received: from [87.69.77.57] (port=1903 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oho0F-0003HF-KT; Mon, 10 Oct 2022 04:19:11 -0400 In-Reply-To: <78205E8D-B2D4-4460-BE0A-9BF7C627A79B@gmail.com> (message from Yuan Fu on Sun, 9 Oct 2022 23:54:45 -0700) 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" Xref: news.gmane.io gmane.emacs.devel:297335 Archived-At: > From: Yuan Fu > Date: Sun, 9 Oct 2022 23:54:45 -0700 > Cc: Eli Zaretskii , > philipk@posteo.net, > emacs-devel@gnu.org > > >> Since tree-sitter support is per-language, I do think it makes sense > >> for each mode to have its tree-sitter support turned on separately. > >> But we could also have a global "turn on tree-sitter support in every > >> mode that has it" option, which will turn this on for those modes > >> which can be supported by tree-sitter, if the appropriate > >> language-support library is installed. > >> > >> Comments? > > > > +1 for this, but also keep the per-modes customs. Then we can eat the > > cake and have it too. > > > > Such a mechanism can be made later, I think? > > > > Theo > > +1 for this, but also add a third possible value to per-mode customs that keeps tree-sitter always off for the mode. That way someone can enable tree-sitter for all but that mode. Are there precedents for such ternary variables? nil, t, and 'never? Yes, we can do that as well. Tristate variables are a legion in Emacs.