From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_Paulo_Labegalini_de_Carvalho?= Newsgroups: gmane.emacs.devel Subject: Re: New defun navigation for tree-sitter (Was: Code navigation for sh-mode with Tree-sitter) Date: Tue, 13 Dec 2022 12:46:13 -0700 Message-ID: References: <1B9F9B3A-A757-4A65-9653-CD0112EB8895@gmail.com> <5BB6E79A-B1FA-40F4-B48A-DADF63A30DDC@gmail.com> <0B190C0C-24BE-490C-9C7D-1439B77EE9D5@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000f50d805efbae07e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8647"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , Alan Mackenzie , emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 13 20:47:13 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 1p5BFA-000212-Pj for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Dec 2022 20:47:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5BEU-0007sD-Km; Tue, 13 Dec 2022 14:46:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5BET-0007s1-2u for emacs-devel@gnu.org; Tue, 13 Dec 2022 14:46:29 -0500 Original-Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5BER-0005sC-Be for emacs-devel@gnu.org; Tue, 13 Dec 2022 14:46:28 -0500 Original-Received: by mail-ed1-x534.google.com with SMTP id s5so19350180edc.12 for ; Tue, 13 Dec 2022 11:46:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=26MIGU5Is4AUVwrcNrnTQDWftVGMkQT2vWpSEYTcYLk=; b=DVeYSoO0iMGVOnx9bBor7ZQBRwgBBuU/ZAgJwjFToK7oSQysH04kgaIXBnfMHobbQm JZOmAER6v/RcVNTBki4v+aRJrqZlGyuwCeR48G6GG5L6T8YVNP8nLZC5JvZ2zciyRZzb 164uGf4cbIFTlBsnxSSBsLA7g/99monxd76h2oso9wdOEOdk0io9vs5JqC+7I1D5IquD Cpiic4ai0IDsmVgnvy5hOw76sWH0/rHywdZcIKH04fA6JvPPBwaodMM34ELhhaYw2NIs ldeK2bQ1fdugkqWyCq52FKwfh5z9nUtxh9BfNKWB0pAVkag3hpU9VmMkH91Pb69DC0jk +8Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=26MIGU5Is4AUVwrcNrnTQDWftVGMkQT2vWpSEYTcYLk=; b=Rf1emfxL0DBSDMh3TCm1kvdT9fjPCv/XZanmYEdyXyKVrITH92ql1fH5iqyH6W1F9D SZw8H5MPMfP9dOr8htZEtLAz6ux5kobz1HfqWN6bq6PLhnFep4VwoBBf/xsY82UE5gaK eC7mfTBRpE53QEmltO2aWezTj8kZXVWt0KpVbtgg1bMm8ybjkWUNamSL/XChERj42XL+ JMCsts82w0o8MMsA/2lDHjcVZ9xZHNwb6aHCwmwNgTtcY00aJtun/pHKPyge+pAvqUu5 TIh429x/WlSQ+yPHH5Y3lG/Lz7xo3J+RC9F/WCpXKaSrXb8vxhymcJzh9kX8rg5qXni6 KsPw== X-Gm-Message-State: ANoB5pn0mIGXrpLgPfzv8lCVBTLbsUERqMjnk2F0f/pXztH3eFzdw+mg go7D8X2ucH/sRzwBeEd7LKDgoNRfs7NLbpnGuDs= X-Google-Smtp-Source: AA0mqf4WYoGIntxFDx9a0wABpxIZMiI49uH2Fxq3wXEVQX6o0Cf7/tttl6rSboViWkkKnjb1bdrcFWxTrFgeygiK8jE= X-Received: by 2002:a05:6402:f1c:b0:46a:b1a9:c34e with SMTP id i28-20020a0564020f1c00b0046ab1a9c34emr29949086eda.212.1670960785607; Tue, 13 Dec 2022 11:46:25 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=jaopaulolc@gmail.com; helo=mail-ed1-x534.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, HTML_MESSAGE=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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301355 Archived-At: --0000000000000f50d805efbae07e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 13, 2022 at 11:56 AM Yuan Fu wrote: > I will repurpose two functions, treesit-beginning-of-defun/end, and make > treesit-major-mode-setup set them up automatically. I=E2=80=99m thinking = about > remapping beginning/end-of-defun to their tree-sitter counterparts in > (current-local-map), in treesit-major-mode-setup. That way major modes > don=E2=80=99t need to explicitly bind tree-sitter functions in their keym= aps. > That would be great. A very clean solution IMO. --=20 Jo=C3=A3o Paulo L. de Carvalho Ph.D Computer Science | IC-UNICAMP | Campinas , SP - Brazil Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canad= a joao.carvalho@ic.unicamp.br joao.carvalho@ualberta.ca --0000000000000f50d805efbae07e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Dec 13, 2022 at 11:56 AM Yuan= Fu <casouri@gmail.com> wrot= e:
I will repurpose two functions, treesit-beginning-of-defun/end, and make tr= eesit-major-mode-setup set them up automatically. I=E2=80=99m thinking abou= t remapping beginning/end-of-defun to their tree-sitter counterparts in (cu= rrent-local-map), in treesit-major-mode-setup. That way major modes don=E2= =80=99t need to explicitly bind tree-sitter functions in their keymaps.=C2= =A0

That would be great. A very clean s= olution IMO.=C2=A0

--
Jo=C3= =A3o Paulo L. de Carvalho
Ph.D Computer Science | =C2=A0IC-UNICAMP | Cam= pinas , SP - Brazil
Postdoctoral Research Fellow | University of Alberta= | Edmonton, AB - Canada
--0000000000000f50d805efbae07e--