From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter integration on feature/tree-sitter Date: Fri, 17 Jun 2022 17:35:50 -0700 Message-ID: <4C257709-0E3E-46A7-8CEB-569001EEE31D@gmail.com> References: <5bada349-2f43-4325-b696-70918584cd3d@email.android.com> <83mtfsuluo.fsf@gnu.org> <87sfpjhm33.fsf@thornhill.no> <83a6brufe5.fsf@gnu.org> <87pmkmhp8i.fsf@thornhill.no> <83v8ueuc7i.fsf@gnu.org> <73DE25BA-5EEF-4497-8F98-8C5F20853A61@gmail.com> <87v8uewfuq.fsf@thornhill.no> <87mtfkbt9n.fsf@thornhill.no> <1179E1EC-90EF-4989-BE1D-115498F77F60@gmail.com> <87k0ajygry.fsf@thornhill.no> <6EF70929-5759-4F1A-B878-0C1660FB6831@gmail.com> <87leuy5z46.fsf@thornhill.no> <2E68780C-9923-411E-A5DF-B1A54E2EC38B@gmail.com> <83k09fq0am.fsf@gnu.org> <38C272F6-828C-4478-9D90-326AF14D0C94@gmail.com> <87h74j2lin.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) 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="36824"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Theodor Thornhill , Stefan Monnier , Daniel Colascione , emacs-devel@gnu.org To: Yoav Marco Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 18 02:37:05 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 1o2MSW-0009Q0-PG for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Jun 2022 02:37:04 +0200 Original-Received: from localhost ([::1]:50458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2MSV-0008G2-Cp for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 20:37:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2MRR-0007UP-D0 for emacs-devel@gnu.org; Fri, 17 Jun 2022 20:35:58 -0400 Original-Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:40913) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2MRP-00080p-6a; Fri, 17 Jun 2022 20:35:56 -0400 Original-Received: by mail-pf1-x433.google.com with SMTP id z17so5446021pff.7; Fri, 17 Jun 2022 17:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=V+AOPyZAeyfR2L8bJQaiC5E0srv1+p7cgX0HCJMAIhM=; b=W1QOqUmVBsCMsY86n5mEwrPrCeD2H8gI2dmCpkTL78r5g8wlwZ6ade3hMBMTe2KKkP lhj11lMcfHQuKeGzeSrfntmo+dwhB4z06lbs2Wugb0s6+YnEXhjZcnx3u8PLKzAcwCTY T5cwTwNCRJWlgTSM7BhMa1eQHxEzZ9/aaFeQdq2Wwp0wKC2hwdD2LF2KhjHqEB/WSjHZ K5d3YtoHdpig2fg1KM6TWYC71NYd/Nasg6YFu1bV8me7kU6NobaL0726+dexAtmioguH fJREIxMGRsKaMO8MD/RnU3r1KSP0GuC4MtzLeb16t3NO1xeq3IZnEV/HapL6u9BvF6uh wL6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=V+AOPyZAeyfR2L8bJQaiC5E0srv1+p7cgX0HCJMAIhM=; b=BaHpaiQDAQ1ejH/QNF3v7WTDmXo30H+02NKv87OXfRV51+k2alwqyGQtvq1tIMLnU9 VG+I6NtTnEU52a0rwhQ/G6PJON4poefEjQb8FHuQHgDz8R73+eHcADqfv0yIAsNSKN4E EDZpES1AdUmmwGKH3HapIFCXDCPdjJvsvClcaXg/mfZd53TKPduYU3QHDf2pqsgi3SCP 3FgTcsTyS9YX/gES+TjnaO/oSbR5n+QODy1K51iy5CstZxTp+BLQLbPknDbtm1+YvBQV Bm2/1IrP/1nJePKFe6KFuCCa3vUEqhSGHb9EblbPlBHLhKd7YP2MbDBxq5HmBLbMIT49 16Gw== X-Gm-Message-State: AJIora9E8hQ+JvWb5wgFkrm2L6VT6+HaiTBAptq6Yi2sQ7/QcPXa4xn1 TkEqCTiZ5HxvUP4XCIPnZzU= X-Google-Smtp-Source: AGRyM1s8CCjGop8/8AWcbM4l5AphilfjcUhAIH4fq2+e75YeqykALUlrxXqTTwglEUaLFCqw1+4pTQ== X-Received: by 2002:a63:2b8c:0:b0:3fe:2062:c14b with SMTP id r134-20020a632b8c000000b003fe2062c14bmr11394230pgr.345.1655512552602; Fri, 17 Jun 2022 17:35:52 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:c15:33ec:172b:f758]) by smtp.gmail.com with ESMTPSA id l15-20020a17090a384f00b001e31f4cc977sm3770440pjf.56.2022.06.17.17.35.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2022 17:35:52 -0700 (PDT) In-Reply-To: <87h74j2lin.fsf@gmail.com> X-Mailer: Apple Mail (2.3696.100.31) Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=casouri@gmail.com; helo=mail-pf1-x433.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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" Xref: news.gmane.io gmane.emacs.devel:291325 Archived-At: >=20 > That reminds me -- Yuan, have you seen my PR to tree-sitter-langs, = Hacky > support for treesit in Emacs core [2]? >=20 > It uses tree-sitter-langs' groundwork for fetching grammars and > packaging highlighting queries, but uses treesit instead of the > tree-sitter dynamic module. >=20 > Enabling highlighting is just M-x treesit-langs-hl-mode in major-modes > that tree-sitter-langs supports. >=20 > [2]: https://github.com/emacs-tree-sitter/tree-sitter-langs/pull/99 Ah yes, I=E2=80=99ve seen it. I think the part that automatically = downloads and builds language definitions is very useful. It cannot be = in Emacs core because we cannot distribute language definitions, but it = could be a very useful ELPA or MELPA package. The part that = automatically generate highlighting is also useful, but I=E2=80=99m not = sure how would we use it. We probably don=E2=80=99t want to add a = tree-sitterify-mode that just enables tree-sitter highlight in a = mode=E2=80=94I prefer that we change each major mode to use tree-sitter = features. Also I think it makes more sense if you just fork it rather than making = a PR. Yuan=