all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#67036: 30.0.50; treesit-forward-sexp not working properly in ruby-ts-mode
@ 2023-11-10  7:42 Juri Linkov
  2023-11-25  9:25 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Juri Linkov @ 2023-11-10  7:42 UTC (permalink / raw)
  To: 67036; +Cc: dmitry

[-- Attachment #1: Type: text/plain, Size: 98 bytes --]

X-Debbugs-Cc: dmitry@gutov.dev

Please try these 5 cases described in the comments of this diff:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ruby-ts-mode.patch --]
[-- Type: text/x-diff, Size: 1144 bytes --]

diff --git a/test/lisp/progmodes/ruby-mode-resources/ruby.rb b/test/lisp/progmodes/ruby-mode-resources/ruby.rb
index 81d0dfd75c9..abe6a0789b9 100644
--- a/test/lisp/progmodes/ruby-mode-resources/ruby.rb
+++ b/test/lisp/progmodes/ruby-mode-resources/ruby.rb
@@ -123,6 +123,7 @@ def test2 (arg)
     puts "there"
   end
 
+  # from "elsif" and "then" C-M-f should jump to next "elsif"/"else" like with { }
   if a == 2 then
     puts "hello"
   elsif a == 3
@@ -179,6 +180,7 @@ def test2 (arg)
     bar,
     :a
 
+# when point is after @, C-M-f should jump to the end of symbol
 zzz @abc,
     4
 
@@ -211,10 +213,16 @@ def test2 (arg)
 
 class C
   def foo
-    self.end
+    self.end # when point between 'e' and 'n', C-M-b should jump to "self"
     D.new.class
   end
 
+  class << self
+    def bar
+    end
+  end
+  # C-M-b at the end of "end" should jump to "class"
+
   def begin
   end
 end
@@ -522,6 +530,9 @@ def qux
   puts "Japanese translation: #{orig_text} => #{trans_text}"
 end
 
+# C-M-f on '[' doesn't jump to after ']'
+hash['key']
+
 # Tokenizing "**" and "|" separately.
 def resolve(**args)
   members = proc do |**args|

[-- Attachment #3: Type: text/plain, Size: 63 bytes --]


Is it possible to improve ruby-ts-mode to handle these cases?

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-05-02  6:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-10  7:42 bug#67036: 30.0.50; treesit-forward-sexp not working properly in ruby-ts-mode Juri Linkov
2023-11-25  9:25 ` Eli Zaretskii
2023-11-26 16:12   ` Dmitry Gutov
2023-11-27 17:06     ` Juri Linkov
2023-11-28 22:15       ` Dmitry Gutov
2023-11-29  7:04         ` Juri Linkov
2023-12-11  0:47           ` Dmitry Gutov
2023-12-11 17:09             ` Juri Linkov
2024-04-14 16:25               ` Juri Linkov
2024-05-02  6:29                 ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.