]> git.eshelyaron.com Git - emacs.git/commit
ruby-ts-mode: Handle indent in parenless calls much closer to ruby-mode
authorDmitry Gutov <dgutov@yandex.ru>
Thu, 19 Jan 2023 01:38:58 +0000 (03:38 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Thu, 19 Jan 2023 03:27:43 +0000 (05:27 +0200)
commitf2bedf695c15da93e8e240ad11a350a8dc8b5549
tree6ee6d45133ffd417cfb26190325352c6c19f83ae
parent758ac5eabbe05fa5244e1bf863e45069035f311c
ruby-ts-mode: Handle indent in parenless calls much closer to ruby-mode

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--parent-call-or-bol):
New function.
(ruby-ts--indent-rules): Use it for cases which need special
anchoring logic when inside a parenless method call.
Remove the ad-hoc handling of pair-hash-pair etc indentation,
which was there only for the parenless cases, apparently.
Have "No paren, ruby-parenless-call-arguments-indent is nil" case
align to the statement, if only because ruby-mode does that.

* test/lisp/progmodes/ruby-ts-mode-tests.el:
Run indent test for ruby-parenless-call-arguments-indent.rb.
lisp/progmodes/ruby-ts-mode.el
test/lisp/progmodes/ruby-ts-mode-tests.el