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

From: Wilhelm Kirschbaum <[email-masked]>
Date: Thu, 17 Apr 2025 08:02:47 +0200

>
>
> Look at how ruby-mode works with navigation ( I have not tried
> > ruby-ts-mode ), as it also properly treats def end blocks as sexps.
>
> Ruby is different since its function body is not enclosed
> within delimiters such as "do...end" in Elixir.
>

Sure, but that is just syntax. the do, end blocks are still just parameters
to the def macro.

>
> >>> The one huge advantage that elixir-ts-mode brought to
> >>> the table was to navigate between functions, the existing elixir-mode
> could
> >>> not get this right.
> >>
> >> The new command 'treesit-cycle-sexp-type' keeps this advantage
> >> while allowing the users to toggle the traditional behavior
> >> where C-M-f moves over the arguments.
> >
> > How do I enable this? Is this a new setting?
>
> Ok, since you prefer treesit-based navigation by default, now I enabled
> 'treesit-cycle-sexp-type' by default in 'elixir-ts-mode'.

I already added the hooks to cycle this on my side, but since it is a
change, perhaps having the default to function as it is before is not a bad
idea.

>
> > Will it make the navigation work as before?
>
> Yes, now by default the navigation works as before.
>

I tried it out and it seems to work well. Thanks for the change, anything
to make it simpler is great.