[Top][All Lists]

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

Re: ruby-ts-mode.el -- first draft

From: Perry Smith
Subject: Re: ruby-ts-mode.el -- first draft
Date: Sun, 11 Dec 2022 10:42:01 -0600

On Dec 11, 2022, at 10:26, Theodor Thornhill <theo@thornhill.no> wrote:

The “lint” in the Ruby community is called Rubocop and it is rather strongly opinionated out of the box but you can adjust it to your liking.  I predict someone will write a set of rules that 100% recreates Rubocop’s out of the box settings.  I think a lot of users would like to have an easy way to enable those “rules” which I consider rather strict.  And, at the same time, I think there will be a lot of users would like a more relax set of rules.  So I am expecting two sets of rules to be developed.

Why not create the two sets now, rather than later? I think we should try to make as good modes as possible so the need for external packages vanishes. If we are not good enough people will just create the modes. Maybe rubocop could be plugged into the Emacs tree-sitter integration?Luckily rubocops author loves Emacs, so they might offer some useful feedback (added Bozhidar Batsov to cc).

This is why I called it a first draft.  I’m hoping others start to play with it and provide feedback.  And I plan to fire up Rubocop (or perhaps contact its author as well) and try to implement the Rubocop mode.

Another option would be to put the various sets of rules in separate variables and then the final set the user could cherry pick the desired set of rules.

The system is incredibly beautiful and versatile and I haven’t seen all the discussions on how to manage and use the versatility that Emacs now has.  I view myself at being rather bad when faced with these types of decisions and choices.

I say bring forward something so we have something to discuss :-)

I was just about to do this.

I want to play around with treesit coupled with align.  Wouldn’t it be super slick if

new_hash = {
  long_ugly_name: 9,
  frog: 12,
  daft: 92,
  egg: 99

was automagically formatted as:

new_hash = {
  long_ugly_name:  9,
  frog:           12,
  daft:           92,
  egg:            99

Well… I am sure some will say “Yea!!!” while others will say “OMG! NO!!!”.  And, clearly how something like that is styled has a lot of alternatives and choices.

But I’m not even sure it is even possible in the practical sense.  I wanted to play with it and see how hard it is as well as ask the list for advice / hints on how to approach this.


Attachment: signature.asc
Description: Message signed with OpenPGP

reply via email to

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