Currently, ruby-mode in Emacs 27 indents the following snippets like this:
expect(foo).to match(
bar
)
expect(foo).to \
match(bar)
Is there a way to have them indented like this, to avoid overly long lines?
expect(foo).to match(
bar
)
expect(foo).to \
match(bar)
EDIT: I am not sure I understand how this relates to paren-less method calls. The indentation for the following has all the parens present and is indented in the same way.
expect(foo).to(match(
bar
))
The example with the line continuation (\) on the other hand is unambiguous, correct? "Indent one level further than the previous non-whitespace line" should cover all cases, unless I am missing something.
The first two examples in this question, which are the default in current ruby-mode both get flagged by RuboCop in the default config with Indent the first parameter one step more than the start of the previous line. I suppose this is not a dead-set argument for or against a particular indentation style. But it might be worth considering providing it as an option given RuboCop's popularity.