From f2bedf695c15da93e8e240ad11a350a8dc8b5549 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Thu, 19 Jan 2023 03:38:58 +0200 Subject: 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. --- test/lisp/progmodes/ruby-ts-mode-tests.el | 1 + 1 file changed, 1 insertion(+) (limited to 'test') diff --git a/test/lisp/progmodes/ruby-ts-mode-tests.el b/test/lisp/progmodes/ruby-ts-mode-tests.el index 1d2cfbfb901..d34c235e82b 100644 --- a/test/lisp/progmodes/ruby-ts-mode-tests.el +++ b/test/lisp/progmodes/ruby-ts-mode-tests.el @@ -255,6 +255,7 @@ The whitespace before and including \"|\" on each line is removed." (ruby-ts-deftest-indent "ruby-block-indent.rb") (ruby-ts-deftest-indent "ruby-method-call-indent.rb") (ruby-ts-deftest-indent "ruby-method-params-indent.rb") +(ruby-ts-deftest-indent "ruby-parenless-call-arguments-indent.rb") (provide 'ruby-ts-mode-tests) -- cgit v1.2.3