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

Add basic EditorConfig file #256

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

jbampton
Copy link
Member

https://editorconfig.org/

From the site:

"EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.
The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles.
EditorConfig files are easily readable and they work nicely with version control systems."

Most editors / IDEs are supported

https://editorconfig.org/

From the site:

"EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.
 The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles.
 EditorConfig files are easily readable and they work nicely with version control systems."

Most editors / IDEs are supported
@jbampton
Copy link
Member Author

There is a good list of projects using EditorConfig:

https://github.com/editorconfig/editorconfig/wiki/Projects-Using-EditorConfig

@ardovm
Copy link
Contributor

ardovm commented Jan 24, 2025

I suggest we add:
tab_width = 4
to the [*] section because many files are formatted this way.

A page on our wiki suggests to use 4 spaces for indentation, so we could also add:

indent_style = space
indent_size = 4

to the same section.

@Pilot-Pirx
Copy link
Member

Pilot-Pirx commented Jan 24, 2025

Wiki is often outdated.

Would that correspond to:

/* vim: set noet sw=4 ts=4: */

@ardovm
Copy link
Contributor

ardovm commented Jan 24, 2025

Wiki is often outdated.

...but I liked it that way... ;-)

In fact, I thought that that wiki page was written after many files were already formatted with tabs.

It may be worth a short discussion on dev@.

Would that correspond to:

/* vim: set noet sw=4 ts=4: */

This should represent the current state of many files, i.e. tabs, to be displayed as 4 spaces.

I was suggesting we rather set et instead of noet, using no tabs for indentation, but rather 4 spaces.

@ardovm
Copy link
Contributor

ardovm commented Jan 24, 2025

Wiki is often outdated.

Would that correspond to:

/* vim: set noet sw=4 ts=4: */

I looked further and now I agree that this is our current standard. Yes, the wiki is outdated.

So this PR shall only add:

tab_width = 4

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

Successfully merging this pull request may close these issues.

3 participants