Can you set so the formatter creates a new line for big data-set?

Currently, the formatter won’t create new lines if the input is too long.

Here is an example:

output = {"a" => 1, "b" => 3, "c" => 3, "d" => 2, "e" => 1, "f" => 4, "g" => 2, "h" => 4, "i" => 1, "j" => 8, "k" => 5, "l" => 1, "m" => 3, "n" => 1, "o" => 1, "p" => 3, "q" => 10, "r" => 1, "s" => 1, "t" => 1, "u" => 1, "v" => 4, "w" => 4, "x" => 8, "y" => 4, "z" => 10}

It would be nice if crystal formater split that data into individual lines.

output = {
  "a" => 1, "b" => 3, "c" => 3, "d" => 2, "e" => 1, "f" => 4, 
  "g" => 2, "h" => 4, "i" => 1, "j" => 8, "k" => 5, "l" => 1, "m" => 3, 
  "n" => 1, "o" => 1, "p" => 3, "q" => 10, "r" => 1, "s" => 1, "t" => 1,
  "u" => 1, "v" => 4, "w" => 4, "x" => 8, "y" => 4, "z" => 10
}

Therefore my question is if there is an option in the formatter for that?

There are no options for the formatter. The idea is that there’s one single configuration that should hopefully work for everyone.

This might be a possible enhancement, though then it wouldn’t be configurable and always enabled instead.
But it might be too much, cause some unintended consequences. Not sure.

Either way, this kind of thing should be quite easy to handle manually. You don’t really need the formatter to this for you.

The thing is that I have a script that builds test files, meaning it won’t work if I do stuff manually.

Sure I could program this kind of “formatter” feature myself although that means my project has more code that needs to be maintained.