-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.editorconfig
More file actions
57 lines (48 loc) · 2.51 KB
/
Copy path.editorconfig
File metadata and controls
57 lines (48 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# EditorConfig — shared across all repos, kept byte-identical by
# `rsmultigit check-same` (rule: editorconfig).
#
# https://editorconfig.org
#
# The per-type sections below describe what each language actually uses in
# these repos today, so editing an existing file does not fight its own style.
# Types with no clear majority (css, js, md, tera) fall through to [*].
#
# Note: this only steers editors as you type. It reformats nothing, and it is
# not a substitute for a formatter (rustfmt, black, gofmt, prettier).
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
# ── 4-space languages ─────────────────────────────────────────────────────────
# py 96%, rs 95%, lua 88%
[*.{py,pyi,rs,lua}]
indent_style = space
indent_size = 4
# ── 2-space languages ─────────────────────────────────────────────────────────
# yml 98%, yaml 98%, tf 96%, json 63%, jsx/scss/rb small but unanimous
[*.{yml,yaml,tf,tfvars,json,jsx,scss,rb}]
indent_style = space
indent_size = 2
# ── tab languages ─────────────────────────────────────────────────────────────
# pl/pm 100%, cc 99%, php 98%, toml 99%, mako 97%, java 91%, h 89%,
# html 78%, c 76%, sh 75%, xml 73%, go 71%
[*.{pl,pm,php,toml,mako,java,c,cc,cpp,h,hpp,html,htm,sh,bash,xml,go,groovy}]
indent_style = tab
# ── tabs are mandatory, not a preference ──────────────────────────────────────
[{Makefile,makefile,GNUmakefile,*.mk}]
indent_style = tab
# ── markdown: two trailing spaces are a hard line break ───────────────────────
[*.md]
trim_trailing_whitespace = false
# ── generated / vendored: leave exactly as upstream wrote it ──────────────────
[{Cargo.lock,package-lock.json,*.min.js,*.min.css}]
insert_final_newline = false
trim_trailing_whitespace = false
# ── patches carry significant trailing whitespace ─────────────────────────────
[*.{patch,diff}]
trim_trailing_whitespace = false
insert_final_newline = false