Skip to content

Instantly share code, notes, and snippets.

@nomicode
Last active April 27, 2024 14:12
Show Gist options
  • Save nomicode/8ac796041f358dd42c638dfe4c93ed2c to your computer and use it in GitHub Desktop.
Save nomicode/8ac796041f358dd42c638dfe4c93ed2c to your computer and use it in GitHub Desktop.
Defaults for EditorConfig
# My defaults for EditorConfig
# https://gist.github.com/nomicode/8ac796041f358dd42c638dfe4c93ed2
# See also:
# - https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 79
trim_trailing_whitespace = true
[*.md]
# indent_size = off
indent_size = 1
max_line_length = off
[{*.plist,*.wflow}]
indent_size = 4
[{*.sh,.ps1,bash_completion,}]
indent_size = 4
[*.sh]
indent_size = 4 # `shfmt -i=4`
shell_variant = posix # `shfmt -ln=posix`
binary_next_line = true # `shfmt -bn`
switch_case_indent = true # `shfmt -ci`
space_redirects = false # `shfmt -sr`
keep_padding = false # `shfmt -kp`
function_next_line = false # `shfmt -fn`
[*.py]
indent_size = 4
profile = black
[Makefile]
indent_size = 4
indent_style = tab
[APKBUILD]
indent_style = tab
[LICENSE]
indent_size = 2
[COMMIT_EDITMSG]
max_line_length = 72
[poetry.lock]
max_line_length = off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment