Reformating Code for JSON in Ruby and Node.js

When automatic reformating is executed in Ruby, A hash could be formatted like below.

json = { :key1 => value1,
             :key2 => value2 }

On the other hand, in Node.js..

json = {
    key1: value1,
    key2: value2
};

I prefer the former.
So I tried to change some configurations for Javscipt code in Preference.
But I couldn't make it.

Is there any possible way?? :)
Thanks.

----

My env: Mac 10.10.1, IntelliJ 14.0.1

1 comment
Comment actions Permalink

No, it's not possible. There should be two additional options under Settings|Editor|Code Style|JavaScript|Object Literals: "New line after '{' and "Place '}' on new line" but they do not exist at the moment and line breaks are always added. Feel free to make a feature request at http://youtrack.jetbrains.com.

0

Please sign in to leave a comment.