Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.editorconfig support #1113

Open
mid-kid opened this issue Feb 23, 2024 · 3 comments
Open

.editorconfig support #1113

mid-kid opened this issue Feb 23, 2024 · 3 comments
Labels

Comments

@mid-kid
Copy link
Member

mid-kid commented Feb 23, 2024

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.

@Rangi42 Rangi42 added the tools label Feb 23, 2024
@aaaaaa123456789
Copy link
Contributor

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
Copy link

Asday commented Feb 23, 2024

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
Copy link
Member Author

mid-kid commented Feb 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants