* lisp/progmodes/ruby-ts-mode.el (ruby-ts--sexp-list-p):
New function (bug#73404).
(ruby-ts-mode): Use it in sexp-list thing definition.
(cherry picked from commit
704aa2b6ebaa0e19f72dcc2e8c0f1a02aa6eadbb)
(equal (treesit-node-type (treesit-node-child node 0))
"(")))
+(defun ruby-ts--sexp-list-p (node)
+ ;; Distinguish between the named `unless' node and the
+ ;; node with the same value of type.
+ (when (treesit-node-check node 'named)
+ (ruby-ts--sexp-p node)))
+
(defvar-keymap ruby-ts-mode-map
:doc "Keymap used in Ruby mode"
:parent prog-mode-map
"array"
"hash")
eol)
- #'ruby-ts--sexp-p))
+ #'ruby-ts--sexp-list-p))
(text ,(lambda (node)
(or (member (treesit-node-type node)
'("comment" "string_content" "heredoc_content"))