(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:
@@ -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)
|
||||
|
||||
|
||||
@@ -79,6 +79,12 @@ foo(a, {
|
||||
c: d
|
||||
})
|
||||
|
||||
foo(foo, bar:
|
||||
tee)
|
||||
|
||||
foo(foo, :bar =>
|
||||
tee)
|
||||
|
||||
# Local Variables:
|
||||
# mode: ruby-ts
|
||||
# ruby-after-operator-indent: t
|
||||
|
||||
Reference in New Issue
Block a user