Skip to content

Commit fcd3171

Browse files
rugeGerritsencarlescufi
authored andcommitted
editorconfig: Add editorconfig file
Adding an editor config file to improve developer experience. Especially nice for editors that default to a tab-size of 4 instead of 8. The file added in this commit is an exact copy of the one found in zephyr. EditorConfig (https://editorconfig.org) is a widely supported configuration tool that helps to ensure better consistency amongst developers by auto-configuring an editor to match the original/intended style i.e. tab-width etc Lots of editors support this natively and those that do not probably have a plugin or extension. Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
1 parent b3860c1 commit fcd3171

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

.editorconfig

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# EditorConfig: https://editorconfig.org/
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# All (Defaults)
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
max_line_length = 100
13+
14+
# Assembly
15+
[*.S]
16+
indent_style = tab
17+
indent_size = 8
18+
19+
# C
20+
[*.{c,h}]
21+
indent_style = tab
22+
indent_size = 8
23+
24+
# C++
25+
[*.{cpp,hpp}]
26+
indent_style = tab
27+
indent_size = 8
28+
29+
# Linker Script
30+
[*.ld]
31+
indent_style = tab
32+
indent_size = 8
33+
34+
# Python
35+
[*.py]
36+
indent_style = space
37+
indent_size = 4
38+
39+
# Perl
40+
[*.pl]
41+
indent_style = tab
42+
indent_size = 8
43+
44+
# reStructuredText
45+
[*.rst]
46+
indent_style = space
47+
indent_size = 3
48+
49+
# YAML
50+
[*.{yml,yaml}]
51+
indent_style = space
52+
indent_size = 2
53+
54+
# Shell Script
55+
[*.sh]
56+
indent_style = space
57+
indent_size = 4
58+
59+
# Windows Command Script
60+
[*.cmd]
61+
end_of_line = crlf
62+
indent_style = tab
63+
indent_size = 8
64+
65+
# Valgrind Suppression File
66+
[*.supp]
67+
indent_style = space
68+
indent_size = 3
69+
70+
# CMake
71+
[{CMakeLists.txt,*.cmake}]
72+
indent_style = space
73+
indent_size = 2
74+
75+
# Makefile
76+
[Makefile]
77+
indent_style = tab
78+
indent_size = 8
79+
80+
# Device tree
81+
[*.{dts,dtsi,overlay}]
82+
indent_style = tab
83+
indent_size = 8
84+
85+
# Git commit messages
86+
[COMMIT_EDITMSG]
87+
max_line_length = 75
88+
89+
# Kconfig
90+
[Kconfig*]
91+
indent_style = tab
92+
indent_size = 8

0 commit comments

Comments
 (0)