EditorConfig is supported by a lot of editors. You can check whether your editor is supported or not on the official website, https://www.editorconfig.org.
You need to create a file called .editorconfig in your root directory – the configuration I use is this one: