How to change a JavaScript formatting option when using nested functions?
Hi,
I've *almost* got IDEA X (10.0.1, IU-99.32) to format JS the way I want, with one exception. I often embed function definitions within function calls; for example:
someObject.aFunction(
function( foo )
{
//do something
},
abc, def
);
But, if I auto indent lines, reformat the code or do a copy paste the nested function is always shifted right to align with the outer function's open paren:
someObject.aFunction(
function( foo )
{
//do something
},
abc, def
);
This would seem to be controlled by the settings in Code Style --> Wrapping and Braces --> Method call arguments but I can't make the change happen. And I feel that this didn't occur with IDEA 9 or early X EAP builds. Anyone know of a way to control this?
Thanks,
Kevin
OS X Snow Leopard
Please sign in to leave a comment.
Hi Kevin,
That seems to be JS formatter bug.
Continuation indent value should be used as a first method call parameter indent value but we see that it's not.
Please submit corresponding bug-report to IJ tracker.
Regards, Denis
Bug IDEA-63703 has been submitted.
Kevin
Cool, thanks!