summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ruby-ts-mode.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2023-01-19 05:26:03 +0200
committerDmitry Gutov <dgutov@yandex.ru>2023-01-19 05:27:43 +0200
commit819719330ad9d1c2836079ef3006c5790fa7f93f (patch)
tree66bdfd6941d5ea010bdcf40cf6a1f9eaa24235c2 /lisp/progmodes/ruby-ts-mode.el
parent94b9cbf96fbb61b53242d205ff559deee36279c6 (diff)
downloademacs-819719330ad9d1c2836079ef3006c5790fa7f93f.tar.gz
emacs-819719330ad9d1c2836079ef3006c5790fa7f93f.tar.bz2
emacs-819719330ad9d1c2836079ef3006c5790fa7f93f.zip
(ruby-ts--indent-rules): Add a rule for continuation of a hash pair
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): Add a rule for continuation of a hash pair. * test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb: Add examples.
Diffstat (limited to 'lisp/progmodes/ruby-ts-mode.el')
-rw-r--r--lisp/progmodes/ruby-ts-mode.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index a2b2721dc1b..c334c4aff0c 100644
--- a/lisp/progmodes/ruby-ts-mode.el
+++ b/lisp/progmodes/ruby-ts-mode.el
@@ -723,6 +723,8 @@ a statement container is a node that matches
((match "]" "array") ruby-ts--parent-call-or-bol 0)
((parent-is "array") ruby-ts--parent-call-or-bol ruby-indent-level)
+ ((parent-is "pair") ruby-ts--parent-call-or-bol 0)
+
((match ")" "parenthesized_statements") parent-bol 0)
((parent-is "parenthesized_statements") parent-bol ruby-indent-level)