Skip to content

Instantly share code, notes, and snippets.

@rafamaciel
Created March 17, 2015 12:42
Show Gist options
  • Save rafamaciel/fd47055f3e5b5ba18d26 to your computer and use it in GitHub Desktop.
Save rafamaciel/fd47055f3e5b5ba18d26 to your computer and use it in GitHub Desktop.
Basic configuration of editorconfig to work with python
;
; 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
@aserron-nayya
Copy link

aserron-nayya commented Aug 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment