--- Begin Message ---
Subject: |
29.0.60; ruby-mode indentation of multi-line expressions |
Date: |
Sun, 18 Dec 2022 21:54:18 -0500 |
Follow-up to bug#60110
I prefer rather simplictic indentation for Ruby (and this appears to be
pretty common from codebases I've seen). Essentially, the rule is: If an
expression continues on another line, indent it once.
Current:
some_variable = some_object.
some_method
Desired:
some_variable = some_object.
some_method
Current:
some_variable = some_number + some_other_number *
some_third_number + some_fourth_number -
some_fifth_number
Desired:
some_variable = some_number + some_other_number *
some_third_number + some_fourth_number -
some_fifth_number
I don't know if this last one is related or not, but it follows the same
rule plus the rule about blocks. Everything about the continuation of
the expression is indented once. The contents of the block are indented
once more. The end should line up with the line that opened the block.
Current:
some_variable = some_array.
map do |x|
x + 1
end
Desired:
some_variable = some_array.
map do |x|
x + 1
end
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#60186: 29.0.60; ruby-mode indentation of multi-line expressions |
Date: |
Sat, 31 Dec 2022 00:07:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
Version: 29.1
On 30/12/2022 20:16, Aaron Jensen wrote:
I can't reproduce this anymore, I think it had to do w/ dtrt-indent
doing something odd. I had things in a state where some buffers did it
and not others and I restarted Emacs before checking the settings. In
any case, I think it's fine. I don't have any concerns with the patch
as-is.
Thanks for testing, this is now in the release branch.
--- End Message ---