(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:
parent
94b9cbf96f
commit
819719330a
2 changed files with 8 additions and 0 deletions
|
@ -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 @@
|
|||
c: d
|
||||
})
|
||||
|
||||
foo(foo, bar:
|
||||
tee)
|
||||
|
||||
foo(foo, :bar =>
|
||||
tee)
|
||||
|
||||
# Local Variables:
|
||||
# mode: ruby-ts
|
||||
# ruby-after-operator-indent: t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue