Add EditorConfig file
isn't that what .clang-format does? (except more generic?)
There is a slight difference. EditorConfig actually changes the settings of your editor, whereas clang-format runs on already written files.
For example, I use vim, and I have it setup to use a soft tab size of 4, which means that as I'm writing code in this repository the indentation is messed up until I run clang-format. With this EditorConfig file it reconfigures my editor to use a soft tab size of 2 while I'm writing the code.
EditorConfig actually changes the settings of your editor
neat. so like having a modeline (vim), but generic.
Exactly
Does this look good now? I think that it is quite accurate to the coding style that is used in this project.
Seeing as it only adds one file that doesn't have any influence on the built firmware and changes the indentation of one file, it should be pretty simple to merge. I find it very useful as I'm writing code, so that I don't need to be constantly adjusting the indentation.
Maybe there aren't many using EditorConfig, which makes it harder to review. My editor just picks up the settings from the opened file and there's always clang-format.