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: Tree-sitter integration on feature/tree-sitter Date: Fri, 17 Jun 2022 13:42:26 +0300 Message-ID: <83bkurpo4t.fsf@gnu.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38970"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theo@thornhill.no, monnier@iro.umontreal.ca, emacs-devel@gnu.org, dancol@dancol.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 17 12:44:57 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 1o29TD-0009vQ-Lb for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 12:44:55 +0200 Original-Received: from localhost ([::1]:50920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o29TC-0006vi-8I for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 06:44:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o29Qv-0005Wb-3h for emacs-devel@gnu.org; Fri, 17 Jun 2022 06:42:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43076) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o29Qu-0005bs-Ev; Fri, 17 Jun 2022 06:42:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=NgDzwUiX9XWTCf5m33Rc9/nsbx/vyefTagNDE+b8/ro=; b=FCP4zH/hxXE/dWduYQPz ZxPcggpcnPepoqF03UGH3g5yFChr7N6fdMlRYRTdqnjEqN8HT8IyBc5vLwLcQ8nkQQktJ3QFgVNf8 QS58c1m16QPUgJXvvZJt6vHMNnqndtDR1+16bVX/rNO8RvhwLTQ7kll2TGQgtSsHJYTd6ML/inSF1 mVB9Vvv5eblX+vr14hsQdIrna+LECghI3XxRyX4i9DLKhzwquuIA8SaWva+qsHkaDb3S+qbBEGSl9 ZXaclAP6OaIEKC0oyJXNjCRmlJ9zG1d51wCbvOaTYPOJqf2jZea0FDdGWSx1+9eQUyWF6V0WShMY6 Ye0oG/mSUnN2/w==; Original-Received: from [87.69.77.57] (port=3656 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 1o29Qt-00085i-Tg; Fri, 17 Jun 2022 06:42:32 -0400 In-Reply-To: <38C272F6-828C-4478-9D90-326AF14D0C94@gmail.com> (message from Yuan Fu on Fri, 17 Jun 2022 00:32:34 -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:291286 Archived-At: > From: Yuan Fu > Date: Fri, 17 Jun 2022 00:32:34 -0700 > Cc: Theodor Thornhill , > monnier@iro.umontreal.ca, > emacs-devel@gnu.org, > dancol@dancol.org > > > > > On Jun 16, 2022, at 11:19 PM, Eli Zaretskii wrote: > > > >> From: Yuan Fu > >> Date: Thu, 16 Jun 2022 12:09:10 -0700 > >> Cc: Eli Zaretskii , > >> Stefan Monnier , > >> Emacs Devel , > >> Daniel Colascione > >> > >> I also added manual entries for traverse functions, please have a look ;-) I haven’t add manual for treesit-search and treesit-defun-query, etc yet. > > > > Could you perhaps post a "cookbook" like recipe for trying the branch > > for some programming language? I mean, what should a user do, after > > building the branch, to start using the features backed by > > tree-sitter? I presume the list should include downloading parsers > > (any recommendations for the relevant sites?), compiling them (or > > maybe there are sites with precompiled ones?), then setting some > > variables or data structures in Emacs or invoking some commands/modes? > > > > I think something like that will be useful for more people to try the > > branch, provide feedback, and facilitate making its more stable. > > I do have an article that covers many of the topics you mentioned [1]. But it lacks “hands-on” details, and it is a bit out-dated (repository moved, we changed the prefix, etc). I can update it with, say, a starter guide on implementing a minimal tree-sitter C major mode. I’ll post back once its done. Thanks, I think that would be useful. > [1]: https://archive.casouri.cat/note/2021/emacs-tree-sitter/index.html This seems to indicate we should provide more higher-level features to make use of tree-sitter related features easier. The instruction there sound like a typical user will need to do a lot before he/she can see any practical benefit from this build. Maybe updating it will solve some of that.