From: Aaron Jensen <aaronjensen@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 54702@debbugs.gnu.org
Subject: bug#54702: 29.0.50; ruby-mode indentation: endless methods
Date: Fri, 16 Dec 2022 00:07:07 -0500 [thread overview]
Message-ID: <CAHyO48xSeBGb4fq-KDD6zUgUXrQ9NxZMM8dgqWvixSyh_T8YQw@mail.gmail.com> (raw)
In-Reply-To: <0178ae56-21d9-55e9-68f6-b2e8e2a483ff@yandex.ru>
On Thu, Dec 15, 2022 at 7:33 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
>
> Hi Aaron,
>
> Sorry for the long pause. You said you're using something else, though,
> so it didn't seem urgent (and I've yet to encounter endless methods at
> $day_job, FWIW).
Not a problem at all. Our project is very data heavy and we define
lots of one line methods, so we have made good use of them.
> Not a problem for me, but could you test the attached patch anyway?
>
> It seems to handle a bunch of different/complex cases fine without
> regressions, but it's always better with a second pair of eyes.
Sure. I tried a few things and the only problem I can find is that it
does not handle endless module methods:
def self.some_method =
"some-value"
(with or without the line break, it handles them as the unpatched
version handles instance endless methods.
> > I'd probably use ruby-mode if
> > it supported indenting long parameter/argument lists the way the
> > non-smie version does, like this:
> >
> > def some_method(
> > some_param,
> > some_other_param
> > )
>
> Now that the SMIE stuff is again in my short-term memory, it shouldn't
> be too hard. Just please file a separate bug report (slash feature
> request) with a precise example. Bonus points for linking to a relevant
> Rubocop rule, so that we can pick a better name for the new user option.
Sure thing, just sent one in: bug#60110
> I don't see the non-SMIE version indenting it like this -- it looks more
> like this instead (and only if I set ruby-deep-indent-paren to nil):
>
> def test2 (
> asd,
> asd
> asd
> )
>
> So let's start with a couple of good examples.
Yeah, this is what I see too. Not sure what I saw before. In any case,
I sent a current/desired.
> My main problem with it is the spotty maintenance like in this example:
> https://github.com/zenspider/enhanced-ruby-mode/issues/96
>
> But it might work fine for many people. Especially those who don't use Robe.
>
> Some previous versions of it (probably by the previous maintainer) were
> really broken, so I just took up ruby-mode instead. I haven't tried
> using its latest versions much.
Copy that. It works well for me. My endless method patch has since been merged.
Unrelated, but I'm excited about the prospect of a treesit mode for Ruby.
Thanks again,
Aaron
next prev parent reply other threads:[~2022-12-16 5:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-04 2:03 bug#54702: 29.0.50; ruby-mode indentation: endless methods Aaron Jensen
2022-04-27 2:44 ` Dmitry Gutov
2022-04-27 23:58 ` Aaron Jensen
2022-12-16 0:33 ` Dmitry Gutov
2022-12-16 5:07 ` Aaron Jensen [this message]
2022-12-16 12:31 ` Dmitry Gutov
2022-12-16 12:40 ` Dmitry Gutov
2022-12-16 14:49 ` Eli Zaretskii
2022-12-18 12:06 ` Dmitry Gutov
2022-12-18 15:42 ` Aaron Jensen
2022-12-16 13:12 ` Aaron Jensen
2022-12-16 16:15 ` Dmitry Gutov
2022-12-16 16:24 ` Aaron Jensen
2022-12-16 17:49 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHyO48xSeBGb4fq-KDD6zUgUXrQ9NxZMM8dgqWvixSyh_T8YQw@mail.gmail.com \
--to=aaronjensen@gmail.com \
--cc=54702@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.