Tweak the left precedence of '=>'
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Tweak the left precedence of '=>', to improve indentation and sexp navigation.
This commit is contained in:
parent
5b705bc97d
commit
9d463aec8b
2 changed files with 7 additions and 1 deletions
|
@ -388,7 +388,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
|
||||||
(cases (exp "then" insts)
|
(cases (exp "then" insts)
|
||||||
(cases "when" cases) (insts "else" insts))
|
(cases "when" cases) (insts "else" insts))
|
||||||
(expseq (exp) );;(expseq "," expseq)
|
(expseq (exp) );;(expseq "," expseq)
|
||||||
(hashvals (id "=>" exp1) (hashvals "," hashvals))
|
(hashvals (exp1 "=>" exp1) (hashvals "," hashvals))
|
||||||
(insts-rescue-insts (insts)
|
(insts-rescue-insts (insts)
|
||||||
(insts-rescue-insts "rescue" insts-rescue-insts)
|
(insts-rescue-insts "rescue" insts-rescue-insts)
|
||||||
(insts-rescue-insts "ensure" insts-rescue-insts))
|
(insts-rescue-insts "ensure" insts-rescue-insts))
|
||||||
|
|
|
@ -415,6 +415,12 @@ def qux
|
||||||
foo(:bar =>
|
foo(:bar =>
|
||||||
tee)
|
tee)
|
||||||
|
|
||||||
|
regions = foo(
|
||||||
|
OpenStruct.new(id: 0, name: "foo") => [
|
||||||
|
10
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
{'a' => {
|
{'a' => {
|
||||||
'b' => 'c',
|
'b' => 'c',
|
||||||
'd' => %w(e f)
|
'd' => %w(e f)
|
||||||
|
|
Loading…
Add table
Reference in a new issue