(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.
This commit is contained in:
Dmitry Gutov 2023-01-19 05:26:03 +02:00
parent 94b9cbf96f
commit 819719330a
2 changed files with 8 additions and 0 deletions

View file

@ -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)

View file

@ -79,6 +79,12 @@
c: d
})
foo(foo, bar:
tee)
foo(foo, :bar =>
tee)
# Local Variables:
# mode: ruby-ts
# ruby-after-operator-indent: t