root = true

[*]
# Custom (libretools) option for scripting
_mode = unknown
# Standard (editorconfig.org) options
charset = utf-8
end_of_line = lf
indent_style = tab
trim_trailing_whitespace = true
insert_final_newline = true

################################################################################
# Bash                                                                         #
################################################################################

[{*.{sh,bash,conf},{write-atomic,write-ifchanged,embedlib.sh.gen,testenv},{createworkdir,diff-unfree,libreaddiff,libredbdiff,librerelease,librerelease-pbot-notify,librestage,distcc-tool,aur,librechroot,libremakepkg,dagpkg,gitget,libregit,is_built,libreblacklist,librelib,libremessages,librefetch,librefetch-install,pkgbuild-check-nonfree,pkgbuild-summarize-nonfree,repo-diff,toru-info,toru-path,toru-where,PKGBUILD,PKGBUILD-*,PKGBUILD.*,SRCBUILD-*,testpkg.install,}}]
_mode = bash
# shfmt options
shell_variant = bash
binary_next_line = false
switch_case_indent = true
space_redirects = false
keep_padding = false
function_next_line = false

[{PKGBUILD,PKGBUILD-*,PKGBUILD.*,SRCBUILD-*}]
indent_style = space
indent_size = 2

# not-quite-Bash
[{conf.sh,makepkg-librefetch.conf,chcleanup,librexgettext}.in]
_mode = atsubst+bash
# shfmt options
shell_variant = bash
binary_next_line = false
switch_case_indent = true
space_redirects = false
keep_padding = false
function_next_line = false

################################################################################
# Other (significant -- >=10 files)                                            #
################################################################################

[{GNUmakefile,Makefile,*.mk}]
_mode = make

[*.{md,ronn}]
_mode = markdown
indent_style = space
indent_size = 4

[*.bats]
_mode = bats
# shfmt options
shell_variant = bats
binary_next_line = false
switch_case_indent = true
space_redirects = false
keep_padding = false
function_next_line = false

[.gitignore]
_mode = gitignore

################################################################################
# Other (insignificant -- <10 files)                                           #
################################################################################

[{*.{po,pot},header.po.head.in}]
_mode = po
indent_style = space

[COPYING{,-GPLv2,-GPLv3}]
_mode = text
indent_style = space

[{indent,runserver}]
_mode = perl

[{source.sh.gen,makepkg.gen}]
_mode = sed

[.editorconfig]
_mode = ini

[*.el]
_mode = emacs-lisp
indent_style = space
