-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
124 lines (90 loc) · 2.91 KB
/
.editorconfig
File metadata and controls
124 lines (90 loc) · 2.91 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# ============================================================
# .editorconfig (Standardize across editors and IDEs)
# ============================================================
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .editorconfig.
# WHY: Establish a cross-editor baseline so diffs stay clean and formatting is consistent.
# ALT: Repository may omit .editorconfig ONLY if formatting is enforced equivalently by CI and formatter tooling.
# CUSTOM: Adjust indent_size defaults only if organizational standards change; keep stable across projects.
# NOTE: Sections are ordered by editorial importance, not strict alphabetical order.
# EditorConfig is documented at https://editorconfig.org
root = true
# === Global defaults (always apply) ===
[*]
# WHY: Normalize line endings and encoding across Windows, macOS, and Linux.
end_of_line = lf
charset = utf-8
# WHY: Newline at EOF avoids noisy diffs and tool warnings.
insert_final_newline = true
# WHY: Remove accidental whitespace noise in diffs.
trim_trailing_whitespace = true
# WHY: Default to 2 spaces for configs and markup; language-specific overrides follow.
indent_style = space
indent_size = 2
# === Build systems (special rules) ===
[Makefile]
# WHY: Makefiles require tabs.
indent_style = tab
[*.mk]
# WHY: Makefile includes require tabs.
indent_style = tab
# === Citation and metadata ===
[CITATION.cff]
# WHY: Citation tooling expects stable YAML formatting.
indent_size = 2
indent_style = space
# === Markup and documentation ===
[*.md]
# WHY: Keep Markdown clean; use explicit <br> for hard line breaks.
indent_size = 2
trim_trailing_whitespace = true
[*.{tex,cls,sty}]
# WHY: LaTeX convention is 2 spaces.
indent_size = 2
indent_style = space
[*.xml]
# WHY: XML convention is 2 spaces.
indent_size = 2
indent_style = space
[*.{yml,yaml}]
# WHY: YAML convention is 2 spaces.
indent_size = 2
indent_style = space
# === Data and configuration ===
[*.{json,jsonc,jsonl,ndjson}]
# WHY: JSON tooling typically expects 2 spaces.
indent_size = 2
indent_style = space
[*.toml]
# WHY: TOML often follows 4-space indentation in many projects.
indent_size = 4
indent_style = space
# === Programming languages ===
[*.{js,ts}]
# WHY: JS/TS ecosystem commonly uses 2 spaces.
indent_size = 2
indent_style = space
[*.{py,pyi}]
# WHY: Python convention is 4 spaces.
indent_size = 4
indent_style = space
[*.ps1]
# WHY: PowerShell convention is 4 spaces.
indent_size = 4
indent_style = space
[*.{c,cpp,h,java,cs,go,rs}]
# WHY: Many C-family and systems languages commonly use 4 spaces.
indent_size = 4
indent_style = space
[*.{sh,bash}]
# WHY: Shell script convention is 2 spaces.
indent_size = 2
indent_style = space
# === Proof assistants and formal languages ===
[*.lean]
# WHY: Lean 4 convention is 2 spaces; matches Mathlib and stdlib style.
indent_size = 2
indent_style = space
[*.{v,vo}]
# WHY: Coq convention is 2 spaces.
indent_size = 2
indent_style = space