[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Code navigation for sh-mode with Tree-sitter
From: |
Stefan Monnier |
Subject: |
Re: Code navigation for sh-mode with Tree-sitter |
Date: |
Tue, 06 Dec 2022 18:50:01 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> However, with negative arguments that does not happen, as
> `sh-mode--treesit-beginning-of-defun' moves point to (beginning of) the
> closest sibling function (after point) and
> `sh-mode--treesit-end-of-defun' moves
> point to (end of) the closest sibling function (before point). In this
> case, the selected functions to which point move to are not the same.
Please read the docstring of `end-of-defun-function`, because I suspect
that you are confused about what it's supposed to do. E.g. it's not
supposed to "move point to (end of) the closest sibling function", so
I think you'll need to set it to a different function than
`sh-mode--treesit-end-of-defun`.
> A second look revealed that the function set to `end-of-defun-function' is
> called without arguments,
As documented in its docstring, yes.
> thus when used can only produce motions that are symmetric to
> `beginning-of-defun-function'.
Not sure what you mean by that.
Stefan
- Re: Code navigation for sh-mode with Tree-sitter, (continued)
- Re: Code navigation for sh-mode with Tree-sitter, Stefan Monnier, 2022/12/06
- Re: Code navigation for sh-mode with Tree-sitter, Yuan Fu, 2022/12/06
- Re: Code navigation for sh-mode with Tree-sitter, Yuan Fu, 2022/12/06
- Re: Code navigation for sh-mode with Tree-sitter, Alan Mackenzie, 2022/12/06
- Re: Code navigation for sh-mode with Tree-sitter, João Paulo Labegalini de Carvalho, 2022/12/06
- Re: Code navigation for sh-mode with Tree-sitter, João Paulo Labegalini de Carvalho, 2022/12/06
- Re: Code navigation for sh-mode with Tree-sitter, Stefan Monnier, 2022/12/06
- Re: Code navigation for sh-mode with Tree-sitter, João Paulo Labegalini de Carvalho, 2022/12/06
- Re: Code navigation for sh-mode with Tree-sitter, Stefan Monnier, 2022/12/06
- Re: Code navigation for sh-mode with Tree-sitter, João Paulo Labegalini de Carvalho, 2022/12/06
- Re: Code navigation for sh-mode with Tree-sitter,
Stefan Monnier <=
- Re: Code navigation for sh-mode with Tree-sitter, João Paulo Labegalini de Carvalho, 2022/12/06
- Re: Code navigation for sh-mode with Tree-sitter, João Paulo Labegalini de Carvalho, 2022/12/07
- Re: Code navigation for sh-mode with Tree-sitter, Yuan Fu, 2022/12/09
- Re: Code navigation for sh-mode with Tree-sitter, Yuan Fu, 2022/12/12
- Re: Code navigation for sh-mode with Tree-sitter, João Paulo Labegalini de Carvalho, 2022/12/13
- New defun navigation for tree-sitter (Was: Code navigation for sh-mode with Tree-sitter), Yuan Fu, 2022/12/13
- Re: New defun navigation for tree-sitter (Was: Code navigation for sh-mode with Tree-sitter), João Paulo Labegalini de Carvalho, 2022/12/13
- Re: New defun navigation for tree-sitter (Was: Code navigation for sh-mode with Tree-sitter), Eli Zaretskii, 2022/12/13
- Re: New defun navigation for tree-sitter (Was: Code navigation for sh-mode with Tree-sitter), João Paulo Labegalini de Carvalho, 2022/12/13
- Re: New defun navigation for tree-sitter (Was: Code navigation for sh-mode with Tree-sitter), Yuan Fu, 2022/12/13