Subject: Re: bug#60110: 29.0.60; ruby-mode method parameter alignment

From: Aaron Jensen <[email-masked]>
Date: Sun, 18 Dec 2022 17:53:25 -0500

On Sun, Dec 18, 2022 at 5:32 PM Dmitry Gutov <[email-masked]> wrote:
>
> I'm assuming the difference in indentation between these posted cases is
> just an email/bug tracker bug. If they are sometimes different, please
> let me know. That would be another bug.

I think so, yeah.

>
> > I would prefer to be able to indent them like this:
> >
> > def some_method(
> >    some_arg,
> >    some_other_arg
> > )
> > end
> >
> > def self.some_method(
> >    some_arg,
> >    some_other_arg
> > )
> > end
>
> See the attached patch. (setq ruby-method-params-indent 0) should do it.

Works for me.

Next question is... is there an existing setting to change the
indentation of expressions like:

x = [3,4].
      map { |x| x * 2 }

Like everything else, I just want a 2 space indent, no alignment,
nothing clever:

x = [3,4].
  map { |x| x * 2 }

I can open another issue for this if there's no existing option and
you'd like me to.

Thanks,

Aaron