For the sake of variation I’ve been writing some of my Scala in Atom. Out of the box support isn’t really there, so the first thing you have to do is to obtain the language-scala package.

Atom currently allows only one code format style, despite supporting many languages. This is problematic because I use 4-space tabs pretty much everywhere else but Scala’s style guide recommends 2-space tabs.

Fortunately there is a package called syntax-settings that allows you to override syntax on a per-language basis. Once installed, add the following section to your Atom config to enable 2-space tabs for Scala only:

        'tabLength': 2