Don't reformat indentation on chained method call with inline function

I'm trying to get WebStorm not to reformat Javascript that looks like this:

obj.method(function() {
    doSomething();
}).chainedMethod();



into this:


obj.method(
        function() {
            doSomething();
        }).chainedMethod();



I want to keep the original formatting for this code.  I'm sure there is some combination of settings in File > Settings > Code Style > Wrapping and Braces will fix it.  But I haven't found that combination.  Any suggestions?

Thanks,

  -- Scott

0
5 comments

+1 also need this :p

0
Avatar
Rustam Vishniakov

Currently there are no settings related to that, chained method calls are always formatted like this (see also http://youtrack.jetbrains.net/issue/IDEA-23994). It makes sense to create another issue in YouTrack (http://youtrack.jetbrains.net).

0

Well, that explains why I couldn't find them!  :)

I'll post a feature request.  Thanks.

  -- Scott

0

Please sign in to leave a comment.