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: Call for volunteers: add tree-sitter support to major modes Date: Sun, 09 Oct 2022 11:47:31 +0200 Message-ID: <84436B1D-3359-487F-B997-A7F56FDEA636@thornhill.no> References: <83czb1jrm3.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="24781"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org, Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 09 11:49:01 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 1ohSva-0006EG-Fm for ged-emacs-devel@m.gmane-mx.org; Sun, 09 Oct 2022 11:48:58 +0200 Original-Received: from localhost ([::1]:51704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohSvY-00020Z-TL for ged-emacs-devel@m.gmane-mx.org; Sun, 09 Oct 2022 05:48:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohSub-0001GK-NP for emacs-devel@gnu.org; Sun, 09 Oct 2022 05:47:57 -0400 Original-Received: from out2.migadu.com ([2001:41d0:2:aacc::]:48280) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohSuZ-0004yW-K1; Sun, 09 Oct 2022 05:47:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1665308871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L7YMitPxwnF7r156Wi4yHLBaneTOf34A3vAnxuRw7mE=; b=gGtoq2vGFjDjCx1W8gK2k7roAqM6Pg5tXORs8xn4k4KunuyFBfMWNf49TWnS2ec2aRSHwX kDAs+jQbzdYvt6+yM9kuC5KTzcAP2OedKCm32VlP787ALOCezcvZMqc1SRkT6iP5R0Dv7a J3ea6VR1WXq9hB6Kcqi2ftFMP/CeefrHTBENyJApFQllJ89q/HTOlUWQ6KWs0ln9iECO8/ 1hLMxJshzWrv0s6OTPxh/u3R/4ySbQmLNxlYvisRVZ4dlufzhrNBJm+/X56wW5DJWEdmBy GYbkfLsM0MlLN2+jrjOlbhsReeCaknCYqxmMsQ1oUtQDQsE4cjNZk8PxECnWtg== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <83czb1jrm3.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=theo@thornhill.no; helo=out2.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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:297248 Archived-At: On 9 October 2022 11:03:48 CEST, Eli Zaretskii wrote: >The Emacs 29 release branch is planned to be cut in about 1=2E5 months, >and we want tree-sitter support to be in Emacs 29=2E The Emacs Git >repository has a feature branch that integrates tree-sitter with >Emacs=2E That branch is being prepared for landing on master=2E However= , >currently there's only one major-mode which can use tree-sitter >support on the branch: Python mode=2E We need to add tree-sitter >integration to more major modes, so that Emacs 29 could have >reasonably useful tree-sitter support options in at least the popular >major modes=2E > >This is a call for volunteers to work on adding tree-sitter support to >major modes beyond Python, and on improving the existing support in >Python mode=2E > >Some of the popular major modes for which we would like to see >tree-sitter support in Emacs 29 are: > > c-mode > c++-mode > emacs-lisp-mode > js-mode > js-json-mode > ruby-mode > shell-script-mode > I can do js-mode=2E I already have made a patch before the api stabilised,= and am pretty familiar with the whole thing=2E I'll look at python and go = from that=2E=20 >We probably won't have all of them by Emacs 29, but we hope to have at >least some=2E > >So if you are interested in enhancing your favorite major-mode with >tree-sitter support, and by doing that making Emacs 29 much better, >please checkout the feature/tree-sitter branch, and start working on >some mode(s)=2E Tree-sitter support for a major-mode should include >enhancement of one or more of the following Emacs features: > > - font-lock > - indentation > - navigation (beginning-of-defun-function etc=2E) > - imenu > - which-func > - thing-at-point > >We think that font-lock is the absolute minimum, followed by >indentation=2E > >To help with this effort, Yuan Fu, who did most of the development on >this feature branch, wrote a document with guidance notes which aim to >help you implement tree-sitter support for the above features=2E You >will find that document and some other helpful documentation in the >admin/notes/tree-sitter directory and its subdirectories on the >branch=2E That directory also includes scripts for easy compilation of >tree-sitter language modules (which you will need to download from the >tree-sitter site)=2E > >We hope that the existing support for Python can serve as working >example of how to add tree-sitter support for other major modes, and >together with the guidance document it will allow you to add support >for more modes with minimum effort=2E Don't hesitate to ask questions >if something is unclear or you need more advice=2E > >We hope volunteers will step forward in time to make tree-sitter >integration in Emacs 29 functional and useful=2E To avoid waste of >effort, please announce here on which major mode(s) you decided to >work=2E > >Thanks in advance=2E >