- en: Ruby format
- jp: ルビーフォーマット
No, but it's getting really close
Build it:
- Make sure you've got cargo installed
- Run
make all
- Copy target/release/rubyfmt-main to somewhere on your path as
rubyfmt
Rubyfmt supports the following CLI invocations:
<whatever> | rubyfmt
pipe from standard inrubyfmt filename
to format a file to stdoutrubyfmt -i files or directories
format files and directories in placerubyfmt directory
to format all ruby files in that directory in place
RUBYFMT_DISABLE_SZUSH=1
: disables the backend render queue writer, very useful for debugging, literally useless if you're not developing rubyfmt itself.
Rubyfmt is a supported formatter in the popular
vscode ruby extension.
You should copy rubyfmt-main
to be called rubyfmt
on your PATH .
Once installed, add the following to vscode's settings.json
file:
"ruby.useLanguageServer": true,
"ruby.format": "rubyfmt",
"[ruby]": {
"editor.formatOnSave": true
},