How to change js3-mode indent style?

I use Emacs also js3-modefor editing javascript code. After I write the following code and indent, I see the following:

var returnValue = someFunction(function () {
                     console.log('This is a callback');
                  });

I want it:

var returnValue = someFunction(function () {
  console.log('This is a callback');
});

It seems to be js3-modetrying to align the callback with the call someFunction, but I don't want this. How to change the indentation style?

Side note: this code was just an example, this is not the code that I am editing, but the situation is similar.

+4
source share
1 answer

From the js3-mode wiki , add this initialization file

(setq js3-consistent-level-indent-inner-bracket t)
+3
source

All Articles