InfiniTime icon indicating copy to clipboard operation
InfiniTime copied to clipboard

Add EditorConfig file

Open FintasticMan opened this issue 3 years ago • 6 comments

See https://editorconfig.org/.

FintasticMan avatar May 27 '22 13:05 FintasticMan

isn't that what .clang-format does? (except more generic?)

yehoshuapw avatar May 27 '22 13:05 yehoshuapw

There is a slight difference. EditorConfig actually changes the settings of your editor, whereas clang-format runs on already written files.

For example, I use vim, and I have it setup to use a soft tab size of 4, which means that as I'm writing code in this repository the indentation is messed up until I run clang-format. With this EditorConfig file it reconfigures my editor to use a soft tab size of 2 while I'm writing the code.

FintasticMan avatar May 27 '22 13:05 FintasticMan

EditorConfig actually changes the settings of your editor

neat. so like having a modeline (vim), but generic.

yehoshuapw avatar May 27 '22 13:05 yehoshuapw

Exactly

FintasticMan avatar May 27 '22 13:05 FintasticMan

Does this look good now? I think that it is quite accurate to the coding style that is used in this project.

Seeing as it only adds one file that doesn't have any influence on the built firmware and changes the indentation of one file, it should be pretty simple to merge. I find it very useful as I'm writing code, so that I don't need to be constantly adjusting the indentation.

FintasticMan avatar Jul 04 '22 18:07 FintasticMan

Maybe there aren't many using EditorConfig, which makes it harder to review. My editor just picks up the settings from the opened file and there's always clang-format.

Riksu9000 avatar Jul 09 '22 07:07 Riksu9000