2 releases

0.0.2 Mar 15, 2024
0.0.1 Mar 5, 2024

#1995 in Parser implementations

Download history 26/week @ 2024-07-25 5/week @ 2024-08-01 10/week @ 2024-09-19 1/week @ 2024-09-26

68 downloads per month

MIT license

285KB
7.5K SLoC

[!WARNING] This is currently under development and has many TODOs and bugs.

rbfmt

Rbfmt is a yet another Ruby code formatter written in Rust, based on the Ruby's official Prism parser.

# a.rb
foo . bar(1,2  3 # 4
  )
$ rbfmt a.rb
# a.rb
foo.bar(
  1,
  2,
  3, # 4
)

Installation

$ cargo install rbfmt

Configuration

You can configure formatting via .rbfmt.yml file.

Available values and defaults:

format:
  line_width: 100

Dependencies

~5.5–8MB
~155K SLoC