See editorconfig.org for details of the format. This is a first attempt at describing our coding style in editorconfig syntax; please add new file types here as they become relevant.
Inspired by !308 (merged). editorconfig is less powerful than clang-format, but also more universal: basically all programmer-oriented text editors have a concept of toggling settings for indent size and whether to indent with hard tabs or spaces, even if they cannot understand the finer points of GNU-style brace positioning.
This should make it a lot less necessary to add vim modelines and Emacs local variables to source files as we have historically done: vim and emacs both have editorconfig plugins available.
We don't have a Meson build system yet, but the one proposed in !303 is 4-space-indented (matching most of the Python and CMake scripts), and I think that's a good style to use, so I've included editorconfig for that too.