Created
March 17, 2015 12:42
-
-
Save rafamaciel/fd47055f3e5b5ba18d26 to your computer and use it in GitHub Desktop.
Basic configuration of editorconfig to work with python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; Global Editor Config for Adaptive Labbers | |
; | |
; This is an ini style configuration. See http://editorconfig.org/ for more information on this file. | |
; | |
; Top level editor config. | |
root = true | |
; Always use Unix style new lines with new line ending on every file and trim whitespace | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
; Python: PEP8 defines 4 spaces for indentation | |
[*.py] | |
indent_style = space | |
indent_size = 4 | |
; Salt state files, YAML format, 2 spaces | |
[*.sls, *.yaml, *.yml] | |
indent_style = space | |
indent_size = 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
EditorConfig is a powerful code formatting tool compatible with most IDEs. It offers more advanced rules than traditional formatters like Prettier and can replicate the JetBrains coding style, with the IDE supporting import/export functionality.
The provided rules are parsed by a LLM from a textual, txt specification file.
This raises the question:
Should we adopt a shared EditorConfig rule set for our team?
This would serve as an additional layer of consistency and ensure everyone is aware of our preferred style conventions.
Links