Subject: Re: bug#76788: treesit-thing-settings for elixir-ts-mode

From: Wilhelm Kirschbaum <[email-masked]>
Date: Mon, 10 Mar 2025 08:39:46 +0200

Thanks Juri,

I will have a look at this early this week. The forward-sexp was added very
early, so there is perhaps a better way now.

On Thu, Mar 6, 2025 at 8:18 PM Juri Linkov <[email-masked]> wrote:

> Hi Wilhelm,
>
> Currently I'm adding the new 'list' thing to all ts-modes
> and noticed that elixir-ts-mode defines the function
> 'elixir-ts--forward-sexp'.
>
> This function can be superseded by the 'list' definition
> in treesit-thing-settings that supports such commands
> as 'forward-sexp', 'forward-list', 'up-list', 'down-list',
> and modes 'show-paren-mode', 'hs-minor-mode'.
>
> I have tested all cases, and this patch covers all list nodes.
> The only doubtful case is the commented out definition
>
>   ;; (and "\\`call\\'" ,#'elixir-ts--defun-p)
>
> When enabled, it causes too much trouble
> with e.g. 'show-paren-mode', etc.
> OTOH, this definition is not much needed since
> 'C-M-a' (beginning-of-defun) and 'C-M-e' (end-of-defun)
> already cover this need instead of using 'C-M-f/b',
> so 'C-M-a/e' could be used to navigate between functions.
> And 'C-M-f/b' navigate in all other cases such as
> between 'do' and 'end', parens, etc.
>