Skip to content

Instantly share code, notes, and snippets.

@aserron-nayya
Created August 6, 2024 23:31
Show Gist options
  • Save aserron-nayya/2a99a4e0dd546bbb35311f91aeea3eeb to your computer and use it in GitHub Desktop.
Save aserron-nayya/2a99a4e0dd546bbb35311f91aeea3eeb to your computer and use it in GitHub Desktop.
Centralize Style Configuration for IDEs
root = true
[*] # All file types
tab_width = 2
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
[*.py] # Python-specific
max_line_length = 79
docstring_fill_column = 78 # Docstring line wrapping
# Indentation rules for Python constructs
[*.py].{def,class}
indent_size = 4
[*.py].{if,while,for,with,try}
indent_size = 4
continuation_indent_size = 8
[*.py].{def,class}.{if,while,for,with,try}
indent_size = 8
continuation_indent_size = 12
[{*.bash,*.sh,*.zsh}]
indent_size = 2
tab_width = 2
[{*.har,*.jsb2,*.jsb3,*.json,*.jsonc,*.postman_collection,*.postman_collection.json,*.postman_environment,*.postman_environment.json,.babelrc,.eslintrc,.prettierrc,.stylelintrc,.ws-context,bowerrc,jest.config,nest-cli.json}]
indent_size = 2
[{*.tf,*.tfvars}]
indent_size = 2
[{*.yaml,*.yml,dbt_project.yml}]
indent_size = 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment