-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.editorconfig
61 lines (52 loc) · 1.92 KB
/
.editorconfig
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
# SPDX-FileCopyrightText: Copyright 2020-2025, Contributors to Tyrannosaurus
# SPDX-PackageHomePage: https://github.com/dmyersturnbull/tyrannosaurus
# SPDX-License-Identifier: Apache-2.0
# Check https://editorconfig.org for more information
# These are derived from https://ukupat.github.io/tabs-or-spaces/
# The most majority indentation style was selected for each language
# Do not look in parent directories
root=true
[*]
end_of_line=lf
charset=utf-8
indent_style=space
indent_size=2
trim_trailing_whitespace=true
insert_final_newline=true
# In 2022, most languages are 2-space
# We assume TypeScript to be 2-space because JavaScript and JSX so strongly are,
# and we'd rather keep those two consistent.
#[*.md]
# using \ is better
#trim_trailing_whitespace=false
[*.{julia,rs,d,cpp,c,m,mm,f99,inc,h,s,asm}]
indent_size=4
# prettier uses max_line_length for --print-width; it's not really the max
max_line_length=120
# 4-space, traditionally compiled without bytecode or JIT --
# Julia, Rust, D, C++, Objective-C, C, Fortran, and Assembly
# We exclude Fortran fixed-form (e.g. .f/.ftn); these have weird indentation rules
# C++ is even between 4-space and 2-space, while C is even between 4-space and tab
[*.{py,ipynb,php,java,groovy,gradle,kt,kts,cs,fs,fsx,fsi,erl,swift}]
indent_size=4
max_line_length=120
# 4-space, generally VM --
# Erlang, F#, Python, PHP (in 8+), Java, Kotlin, Groovy (+Gradle), F#, erlang, Swift
[*.{lua,vala,pl,perl,ps1,bat}]
indent_size=4
max_line_length=120
# 4-space, generally interpreted --
# Lua, Vala, Perl, PowerShell, Batch
# Lua and Vala are about even between 4-space and tab
[*.{go,hx,v,sv,sas,au3}]
indent_style=tab
max_line_length=120
# tab-based --
# Go, Haxe, Verilog, System Verilog, SAS, and AutoIt
[*.{tsv,tab,csv}]
indent_style=tab
trim_trailing_whitespace=false
insert_final_newline=false
# CSV-like
# do NOT add a newline or trim whitespace
# indent_style=tab seems safer but is probably not necessary