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


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 62086 <at> debbugs.gnu.org
Subject: bug#62086: 29.0.60; ruby-ts-mode regressions
Date: Wed, 05 Apr 2023 19:25:46 +0300
> 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.

> +(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 ']'.




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

Previous Next


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