Improve ".editorconfig" files

If I look in
https://github.com/getkirby/getkirby.com/blob/master/.editorconfig
or
https://github.com/getkirby/starterkit/blob/master/.editorconfig
or
https://github.com/getkirby/plainkit/blob/master/.editorconfig

I see, that only for php-files in site/templates/ and site/snippets/ there is one definition:

indent_size = 2

There are no restriction in the .editorconfig file to the other settings for all php-files.

I think this should be improved.

I think .editorconfig-files are highly opinionated. These are the preferences of the Kirby core team apparently, but you can easily adapt it to your choice :slight_smile:

Sorry, my excellent editor Notepad++ follows such files, if you install that plugin.
And that is very fine!

So I cannot agree to:

Yes, I know that, but not every body.

If such a file is downloaded, it should be best, I think.

So I made this suggestion.

[added:]
Look for details at https://editorconfig.org/

What is best? What fits your style might not fit mine and vice versa. I guess that is what @bvdputte meant by „opinionated“.

@anon77445132, I’m sorry I wasn’t clear.

I meant that coding style is highly personal because of what the developer’s likes best, hence “opinionated”. When I start a new project, based on another developer’s work (like the Kirby starterkit), it’s nice to see the developer expressing his/her preferences via an .editorconfig file.

If some things annoy you, you can easily replace this file with another one with your preferences and your editor should pick up yours.

As @gearsdigital mentions, it’s hard to come up with an .editorconfig file that caters everyone. :slight_smile: