bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Dmitry Gutov
Subject: bug#62086: 29.0.60; ruby-ts-mode regressions
Date: Wed, 5 Apr 2023 03:06:52 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

On 04/04/2023 10:16, Juri Linkov wrote:
I wonder is it possible to fix more.
Many parens/brackets are still not matched in e.g.
test/lisp/progmodes/ruby-mode-resources/ruby.rb
such as parens in def argument list:

   def test1(arg)

This one was a regression from the addition of strict bos/eos anchors, now fixed.

and in

   method (a + b),

When you say that this is broken, do you mean that these parens get jumped over unexpectedly (with forward-sexp movement ending at the end of the arguments list)? This is an artefact of the implementation of treesit-forward-sexp. It might be possible to improve, but from a brief dig, it has some internal logic. So some care would need to be taken to decide which contract nedds changing.

and brackets in

   case translation
   in ['th', orig_text, 'en', trans_text]
     puts "English translation: #{orig_text} => #{trans_text}"
   in {th: orig_text, ja: trans_text} => whole

Now fixed. Also, "case" matches "end" with this syntax too now.

Also square brackets are not matched by 'C-M-f' in

   h[:key]

And this, surprisingly, seems impossible to handle just using treesit-sexp-type-regexp. The brackets are present in the tree, but they are not at the ends of any node. So that will require some custom Lisp, I guess.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]