bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60186: 29.0.60; ruby-mode indentation of multi-line expressions


From: Aaron Jensen
Subject: bug#60186: 29.0.60; ruby-mode indentation of multi-line expressions
Date: Tue, 20 Dec 2022 00:56:02 -0500

On Mon, Dec 19, 2022 at 11:48 PM Aaron Jensen <aaronjensen@gmail.com> wrote:
>
> On Mon, Dec 19, 2022 at 9:12 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
> >
> > On 19/12/2022 04:54, Aaron Jensen wrote:
> > >
> > > Follow-up to bug#60110
> >
> > Thanks!
> >
> > > 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.
> >
> > FWIW, this feels a little wasteful -- working to emulate the editors
> > which don't have much of a grammar definition, so they mostly line up
> > things to the beginning of the previous line (plus maybe the indentation
> > offset).
> >
> > But I guess that can make some experience better when working in teams.
>
> The implication here is that the current indentation
> rules are somehow objectively better. I'd argue the opposite,
>                                       that they have usability issues.
>
> :)
>
> In all seriousness though,

Sorry, I was going to say, this style of indentation is more inline
with what I see in the wild in Ruby codebases and essentially every
other editor I've seen. Also, enh-ruby-mode is what I'm using as a
guide here, and it has a pretty much perfect grasp of the grammar
since it uses the Ruby parser. It's just a simpler indentation norm.

Aaron





reply via email to

[Prev in Thread] Current Thread [Next in Thread]