Reputation: 6043
Right now, when I format the following code,
let a = {
x: true,
y: false,
z: true
};
let b =
{
x: true,
y: false,
z: true
};
I get this result:
let a = {
x: true,
y: false,
z: true
};
let b =
{
x: true,
y: false,
z: true
};
My goal is to get this as output:
let a =
{
x: true,
y: false,
z: true
};
let b =
{
x: true,
y: false,
z: true
};
Alternatively, I'd settle for having a
unchanged and having b
maintaining its indentation.
let b =
{
x: true,
y: false,
z: true
};
We could solve this by using formatter on and off tags, but then the content of the object literal (such as callback functions and arrays) wouldn't get formatted anymore, so this is not a preferable solution.
These are the current formatting settings for "Wrapping and Braces":
If there's a solution which only works in IntelliJ 2017 then that might be workable too, since we're looking into upgrading.
Upvotes: 0
Views: 205