shell-things/.editorconfig

97 lines
2.7 KiB
INI

# See https://editorconfig.org for more information
# Note: I use this file as ~/.editorconfig when something doesn't specify to
# be root before reaching ~, so this contains files not seen in this repo
root = true
# Defaults
[*]
# Future: https://github.com/editorconfig/editorconfig/issues/89
# Remember to always .gitattributes. lf line-endings are prettier default and
# required by doctoc, so enabling either of those breaks on Windows unless lf
# is specified here and in .gitattributes
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
# Accessibility reasons. Vim: :%retab! (note also :set ts=4)
indent_style = tab
indent_size = tab
# Usable in common Braille displays? Line continuation marker and diffing
# take two. Prettier default 80. WCAG requirement 80.
max_line_length = 78
# Opinionated affecting only display, better to not set
#tab_width =
# *nix, just in case
[*.{bash,sh}]
# .gitattributes !
end_of_line = lf
# Limnoria/Supybot config files use trailing spaces for empty config files,
# let's try to not break them.
[*.conf]
trim_trailing_whitespace = false
# Crystal https://crystal-lang.org/reference/1.7/conventions/coding_style.html#indentation
[*.cr]
indent_style = space
indent_size = 2
[*.csv]
max_line_length = unset
# Markdown apparently allows linebreaks by two trailing spaces, while I
# never seem to do that, maybe I should accept it
[{LICENSE,*.{markdown,md}}]
trim_trailing_whitespace = false
# Prettier seems to believe spaces are the only way to markdown
indent_style = space
indent_size = 2
# Nim https://nim-lang.org/docs/nep1.html#introduction-spacing-and-whitespace-conventions
[*.nim]
indent_style = space
indent_size = 2
max_line_length = 80
# Python https://peps.python.org/pep-0008/#indentation
[*.py]
indent_style = space
indent_size = 4
max_line_length = 79
# Ruby
#[*.rb]
# Unofficial Ruby Style guide says two spaces, but Wikipedia says it doesn't
# matter so I am going accessibility first and having this commented
# https://rubystyle.guide/#spaces-indentation
#indent_style = space
#indent_size = 2
# LaTeX with git should be used one sentence per line for maximum efficiency
[*.tex]
max_line_length = unset
# TAB Separated Values
[*.{tsv,tab}]
indent_style = tab
indent_size = tab
# empty last columns/fields
trim_trailing_whitespace = false
max_line_length = unset
# RFC 678
#[*.txt]
#max_line_length = 72
# Windows line-endings for Windows
[*.{reg,bat,ahk}]
# Remember the .gitattributes !
end_of_line = crlf
# YAML requires spaces. The GitHub citation files look YAML to me.
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files
[*.{cff,yaml,yml}]
indent_style = space
indent_size = 2