pret / pokecrystal

Disassembly of Pokémon Crystal
https://pret.github.io/pokecrystal/
2.05k stars 768 forks source link

.editorconfig support #1113

Open mid-kid opened 4 months ago

mid-kid commented 4 months ago

Vim just integrated editorconfig support in version 9.1, so I'm starting to add it to my workflow properly, after having had it around as a plugin for way too long. The main significant holdout that doesn't support it natively is notepad++, which for now still requires a plugin.

Editorconfig (link) is a configuration format that allows cross-editor preferences, to configure things like line endings, indentation style and tab size. For the longest time I've had a .lvimrc in the folder containing my pret projects, but implementing this would mean I don't have to keep in mind where I put the project anymore. This would also benefit a plethora of other people as more editors start supporting it.

This is a oldgen pret-wide change, and would be nice to coordinate with the gen1 repos as well, to share a common config. gen3+ are a different language so things are different there anyway.

aaaaaa123456789 commented 4 months ago

Would this add anything, really? Line endings are normalized by Git, tab sizes are better left unconfigured (there are zero advantages to forcing a uniform tab size and it runs the risk of people starting to mix tabs and spaces, because some people really believe that tabs are four spaces), and the indentation style would be picked up trivially by any tool that simply preserves the previous line's indentation.

Asday commented 4 months ago

Personally I like .editorconfig even when it required plugins and I or my team didn't use them, because it defines in code "here is how we style things".

The amount of time I've lost to pointless tabs vs spaces arguments in Slack is astounding. Put it in .editorconfig, and no arguments can be had.

mid-kid commented 4 months ago

it runs the risk of people starting to mix tabs and spaces

The point of this config is making that ever harder by preconfiguring editors with the right settings. I don't particularly care about setting a tab size, if we can at least set the indentation style to tabs instead of spaces.

the indentation style would be picked up trivially by any tool that simply preserves the previous line's indentation.

I'm not aware of any editor that actually does this.