Basic Editor Setup
To setup the basic editor support you must have a .editorconfig at the root of every project.
EditorConfig will tell the editor how to indent the code and some basic configuration.
root = true
[*]
indent_style = tab
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
[*.json]
indent_style = space
indent_size = 2
Some editors come bundled with native support for EditorConfig and others need a plugin.
For the list of plugin please refer to this page
At the time of writing only WebStorm comes with built-in EditorConfig.
In VSCode you can set "editor.formatOnSave": true and it will automatically format the file on save.