Subject: bug#62086: 29.0.60; ruby-ts-mode regressions

From: Dmitry Gutov <[email-masked]>
Date: Wed, 5 Apr 2023 19:36:37 +0300

On 05/04/2023 19:25, Juri Linkov wrote:
>> There is no mechanism for precedence in the current implementation. We can
>> try ignoring the implicit parens in the parenless method calls,
>> though. Like this:
> I don't know how many users might still want to skip implicit parens.
> Maybe this could be customizable with another list that by default
> includes "argument_list".  It's nice that it's doable with the
> current treesit features.

Calls with both physical and implicit parens have this type.

I'd rather not add user option in advance, let's try to work out what 
looks like the most reasonable behavior, and then add them after 
specific requests.

>> +(defun ruby-ts--sexp-p (node)
>> +  ;; Skip parenless calls (implicit parens are both non-obvious to the
>> +  ;; user, and might take over when we want to just over some physical
>> +  ;; parens/braces).
>> +  (or (not (equal (treesit-node-type node)
>> +                  "argument_list"))
>> +      (equal (treesit-node-type (treesit-node-child node 0))
>> +             "(")))
> Maybe something similar could be used to detect '[' in 'h[:key]'
> to match the corresponding ']'.

It doesn't look like that, no.