GNU bug report logs - #62086
29.0.60; ruby-ts-mode regressions

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 9 Mar 2023 17:28:02 UTC

Severity: normal

Fixed in version 29.0.60

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #46 received at 62086 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>
Cc: 62086 <at> debbugs.gnu.org
Subject: Re: bug#62086: 29.0.60; ruby-ts-mode regressions
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.




This bug report was last modified 2 years and 96 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.