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: Call for volunteers: add tree-sitter support to major modes Date: Mon, 10 Oct 2022 10:53:54 -0700 Message-ID: <27687E8C-9E99-48BE-A4A8-A22E28C47266@gmail.com> References: <83czb1jrm3.fsf@gnu.org> <84436B1D-3359-487F-B997-A7F56FDEA636@thornhill.no> <83bkqljih5.fsf@gnu.org> <87fsfx6ufb.fsf@thornhill.no> <8335bxjdpf.fsf@gnu.org> <1D07A0F1-A269-410A-9D3C-8A53113FFE2F@thornhill.no> <83sfjxhuvc.fsf@gnu.org> <87bkqk7qb0.fsf@thornhill.no> <8735bw7kwm.fsf@thornhill.no> <158F25C9-A539-4515-8D49-50A7E6252960@gmail.com> <87o7uk5f5i.fsf@thornhill.no> <87edvf8wwl.fsf@thornhill.no> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="18553"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 10 20:47:37 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 1ohxoP-0004ZK-4k for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 20:47:37 +0200 Original-Received: from localhost ([::1]:40504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohxoO-0007yr-1t for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 14:47:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohwyd-0004tx-4p for emacs-devel@gnu.org; Mon, 10 Oct 2022 13:54:10 -0400 Original-Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:43600) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ohwyW-0003SW-9E; Mon, 10 Oct 2022 13:54:04 -0400 Original-Received: by mail-pj1-x102a.google.com with SMTP id x31-20020a17090a38a200b0020d2afec803so3898070pjb.2; Mon, 10 Oct 2022 10:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OW1XWb5yeJqkzJcNHNpZuverSFaHt7/eBnjydIzAtJE=; b=GfRDGlGeQRybxoW784VlzioRB1l37+4bd9RqvXDHfiwnMkkwXFSwWCL8WQB1LSGF3Z eym8X7gOKGuyhe6YK3bKXconrHfd7mLuynII7BW/e0yARtduUU4Yws/FYfByYlA3wwyo imkesEb4Bh3y7R92+AOFGQo4nUzsRhdkype7suUDDjHbTdpWNbgJ3WwsGiOK8OEYSGJ1 snZ3yKm96OzhF3fTRyRygRMUTnmeJszeW5tbpNRzuDBw1Ku5AfXVeszm2onbYOnZwQlw 8n0m2ZACPXL1r+f68CHZtIVgfTKi7AmaCdTvu4izTgj9iBkvtQxu+cpI3b1lbdWbnIz+ xNXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OW1XWb5yeJqkzJcNHNpZuverSFaHt7/eBnjydIzAtJE=; b=hgeGkcaT9ZCyiwAvUIurES5HDO9x27d6sldx9S91Whqx8W9rlEHu6VylDFeFapP47V wEuBMW4moawKj28v0Nj/f8wV0Lp8owxrnaxE5eftyNxH77PV2Mc63bwqjol5ZJbW4LCp qsfypEd52I2sBDDv366JI1IeI1YrQ9a28FE9tR49V7SLMNybX2SDHDTWLO0bln29eQHR jDIUp/Wc/8neqp5Vta8tOyuAV7c8aNAbR62js9zVLHFc1KHIWhXxF3cHKao76WgJq4kO NqIUaaXCqRjTYtw4HCsSKSISc9tB6fg5ClQig/TDgw+d2PKp946kmSQl2KkNs5yvmwQ9 V61g== X-Gm-Message-State: ACrzQf3Yl/QWWrz1jugDLuusT9MdE0jNFhgBPBxLrgAQuAW8DbujQgW3 6KRrwtg8jZHH5A5wdjTsEzA= X-Google-Smtp-Source: AMsMyM7DLmjDJjzZsjmlzppAtgV8JPbkHPOa8H5InAJiBw/wwwr46mXsDqkGweiXGyLQ0Dsdk3YZUA== X-Received: by 2002:a17:90b:4d0d:b0:1fb:a86d:e752 with SMTP id mw13-20020a17090b4d0d00b001fba86de752mr21932682pjb.120.1665424435998; Mon, 10 Oct 2022 10:53:55 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id d5-20020a170902cec500b001789ee5c821sm6607445plg.61.2022.10.10.10.53.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Oct 2022 10:53:55 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=casouri@gmail.com; helo=mail-pj1-x102a.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 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:297392 Archived-At: > On Oct 10, 2022, at 10:16 AM, Yuan Fu wrote: >=20 >=20 >=20 >> On Oct 10, 2022, at 9:29 AM, Theodor Thornhill = wrote: >>=20 >>>> I added some variartion of this. I think also message is better, >>>> because user-error makes the logic a little harder. What do you >>>> think? >>>=20 >>> Yeah user-error is mostly the same as a message, since nobody (I >>> think) turns on beeping anymore. Though I hope there is a way to = warn >>> users that=E2=80=99s not missable. Messages (and user-error) could = be covered >>> by later messages. Hmm, maybe we can use warnings. >>>=20 >>> For template string please see that patch that applies on top of = your >>> patch. It seems to work for me. (Also see screenshot attached, >>> brackets have different colors because I forgot to turn off >>> rainbow-delimiter-mode when taking the shot). Also some of the lines >>> are longer than 70 columns. Could you wrap those lines? >>>=20 >>=20 >> Yeah, it is better, though we still get some bleeding into the parens >> etc. Anyway, I think we can tweak this later. >>=20 >> Applied your changes, see latest revision. >>=20 >> Thanks, >> Theo >>=20 >> <0001-Add-tree-sitter-functionality-to-js-mode.patch> >=20 > Thanks! Looks good, I=E2=80=99ll apply it. BTW, you don=E2=80=99t need = to explain what does a function do in the commit message, just what = changed. For new functions, you can just say =E2=80=9CNew function=E2=80=9D= . And you can merge several entries together, like >=20 > (js--treesit-backward-up-list) > (js--treesit-indent-rules) > (js--treesit-keywords) > (js--treesit-settings): New functions. >=20 >=20 > Yuan Pushed. Please also see the change I made after your patch, for = beginning/end-of-defun functions I added a new function = treesit-search-forward-goto which is very handy, it should be faster, = simpler to use, and wouldn=E2=80=99t get stuck like the old approach. = And I changed =E2=80=9Cvariable_declarator=E2=80=9D to = =E2=80=9Clexical_declaration=E2=80=9D. Yuan