-
Notifications
You must be signed in to change notification settings - Fork 817
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
Comments
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. |
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. |
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.
I'm not aware of any editor that actually does this. |
Suggested content, if we add one: # https://editorconfig.org
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab These settings should be appropriate for whatever files we add -- .asm, .inc, .md, .txt, .c, .py, Makefile, etc -- so no need to get specific with the section name to filter by file extension. |
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.
The text was updated successfully, but these errors were encountered: