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
Avatar
Permanently deleted user

+1 also need this :p

0

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
Avatar
Permanently deleted user

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

I'll post a feature request.  Thanks.

  -- Scott

0
Avatar
Permanently deleted user
0
Avatar
Permanently deleted user

Scott,

Thanks!

0

Please sign in to leave a comment.