GNU bug report logs - #60321
29.0.60; ruby-mode indentation of hash or array as first arg in multiline method call

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sun, 25 Dec 2022 21:30:02 UTC

Severity: normal

Merged with 72099

Found in versions 29.0.60, 31.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #37 received at 60321 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Aaron Jensen <aaronjensen <at> gmail.com>
Cc: 60321 <at> debbugs.gnu.org
Subject: Re: bug#60321: 29.0.60; ruby-mode indentation of hash or array as
 first arg in multiline method call
Date: Mon, 2 Sep 2024 04:10:05 +0300
On 02/09/2024 03:49, Aaron Jensen wrote:

>> Here's a bonus example which looks off but would be more difficult to
>> fix (and it's not urgent, given the expression is in mixed styles):
>>
>> foo([{
>>     a: 2
>> },
>>        {
>>          b: 3
>>        },
>>        4
>>       ])
> 
> Yes, that's connected to the case I mentioned... how do you think it
> should be indented? I wonder if it should just be 2 spaces in (rather
> than aligned with the opening bracket)

It seems to me that anything other than 0 spaces would look inconsistent 
with the first element (the hash), and its closing brace in particular.

Anyway, it's not urgent and like you said in the first message, people 
formatting code this way might have other unusual requirements as well.

>> * Support for the new option in ruby-ts-mode (it's good to have parity).
>> Could you take the attached patch for a spin? Seems to work here, but
>> I'd like to have an extra confirmation.
> 
> I don't have the treesitter stuff installed at the moment, will try
> this out shortly.

Thanks in advance.




This bug report was last modified 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.