I'm trying to set new formatting for me. Because of this problem.

Before auto format.

enter image description here

After auto format. enter image description here

I checked Idea Settings. But seems there are not too many settings for Dart. I have removed all the setting with line merging. But above issue still exist. For example. This setting, which should work, but it doesn't.

enter image description here

Any suggestion?


Solution 1: Ruyut

I have this problem too

My solution is "Select the range I want to auto format and click Ctrl+Alt+L"...

I have given up auto format all...


Solution 2: tatumizer

End each line you don't want to be affected by formatting with "//":

[1, 2, 3]
      .map((a) => 0) //
      .map((a) => 1); //
var x = [ 
  0, 1, 2, //
  3, 4, 5 //
];