How to improve auto indentation?


Hello! I would like to learn how the auto indentation is calculated by the editor. Being new to Atom, I am currently having trouble finding any documentation related to this feature.

One of the specific situations I curious about improving is the auto indentation of JavaScript method chains.

Below is an example of how they are currently auto indented.

const newValue$ = domSource()
.map(ev =>

Though how can I accomplish the following?

const newValue$ = domSource()
  .map(ev =>`

I’ve noticed if the first method in the chain is manually indented, those that follow will be indented to the same column, though if the entire file is auto indented it will all be reset.


Indentation is calculated by the editor based on the language’s settings. Here are the settings for JavaScript. There are two regular expressions, one which increases the indent when matched and one which decreases the indent.


How would I be able to modify that setting?


Any language-specific setting can be overridden by the user in their config.cson.