From: Yuan Fu <casouri@gmail.com>
To: "João Paulo Labegalini de Carvalho" <jaopaulolc@gmail.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
Alan Mackenzie <acm@muc.de>,
emacs-devel@gnu.org
Subject: Re: New defun navigation for tree-sitter (Was: Code navigation for sh-mode with Tree-sitter)
Date: Tue, 13 Dec 2022 10:56:42 -0800 [thread overview]
Message-ID: <EF33B696-A53D-46FC-BE1D-8FDB8D9F13CF@gmail.com> (raw)
In-Reply-To: <CAGjvy2-VdkgF6=n48_Nd5Fx4kbHN6OFHVd5XUvzYX0qmrvV=pg@mail.gmail.com>
> On Dec 13, 2022, at 10:48 AM, João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com> wrote:
>
>
> On Tue, Dec 13, 2022 at 11:07 AM Yuan Fu <casouri@gmail.com> wrote:
> Treesit--navigate-defun should, as you did in bash-ts-mode, only navigate in the same level (siblings) or higher (parents). Could you show an example of the unexpected behavior?
>
> I must have forgotten to evaluate something on my setup file. It is indeed working as you described. Sorry for the noise.
>
> Should I add key bindings to use the new tree-sitter navigation functions to bash-ts-mode or is it planned an integration with beginning/end-of-defun?
I will repurpose two functions, treesit-beginning-of-defun/end, and make treesit-major-mode-setup set them up automatically. I’m 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’t need to explicitly bind tree-sitter functions in their keymaps. Stefan, would that be a good idea?
So if everything goes as planned, bash-ts-mode only needs to set treesit-defun-type-regexp.
Yuan
next prev parent reply other threads:[~2022-12-13 18:56 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-03 20:23 Code navigation for sh-mode with Tree-sitter João Paulo Labegalini de Carvalho
2022-12-03 21:46 ` Alan Mackenzie
2022-12-05 15:24 ` João Paulo Labegalini de Carvalho
2022-12-05 20:12 ` Stefan Monnier
2022-12-05 21:29 ` Alan Mackenzie
2022-12-05 21:56 ` Stefan Monnier
2022-12-06 15:51 ` João Paulo Labegalini de Carvalho
2022-12-06 16:48 ` Stefan Monnier
2022-12-06 21:04 ` Yuan Fu
2022-12-06 21:08 ` Yuan Fu
2022-12-06 21:40 ` Alan Mackenzie
2022-12-06 21:46 ` João Paulo Labegalini de Carvalho
2022-12-06 21:55 ` João Paulo Labegalini de Carvalho
2022-12-06 22:35 ` Stefan Monnier
2022-12-06 22:41 ` João Paulo Labegalini de Carvalho
2022-12-06 22:57 ` Stefan Monnier
2022-12-06 23:43 ` João Paulo Labegalini de Carvalho
2022-12-06 23:50 ` Stefan Monnier
2022-12-07 1:12 ` João Paulo Labegalini de Carvalho
2022-12-07 17:20 ` João Paulo Labegalini de Carvalho
2022-12-10 4:58 ` Yuan Fu
2022-12-13 4:55 ` Yuan Fu
2022-12-13 16:00 ` João Paulo Labegalini de Carvalho
2022-12-13 5:20 ` New defun navigation for tree-sitter (Was: Code navigation for sh-mode with Tree-sitter) Yuan Fu
2022-12-13 16:11 ` João Paulo Labegalini de Carvalho
2022-12-13 16:38 ` Eli Zaretskii
2022-12-13 18:03 ` João Paulo Labegalini de Carvalho
2022-12-13 18:07 ` Yuan Fu
2022-12-13 18:48 ` João Paulo Labegalini de Carvalho
2022-12-13 18:56 ` Yuan Fu [this message]
2022-12-13 19:46 ` João Paulo Labegalini de Carvalho
2022-12-16 1:49 ` Yuan Fu
2022-12-16 16:24 ` João Paulo Labegalini de Carvalho
2022-12-17 23:32 ` Yuan Fu
2022-12-07 0:41 ` Code navigation for sh-mode with Tree-sitter Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=EF33B696-A53D-46FC-BE1D-8FDB8D9F13CF@gmail.com \
--to=casouri@gmail.com \
--cc=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=jaopaulolc@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.