xref: /qemu/.editorconfig (revision 0e3aff9ec34059512d597eacfcf4d1b5d4570c50)
1# EditorConfig is a file format and collection of text editor plugins
2# for maintaining consistent coding styles between different editors
3# and IDEs. Most popular editors support this either natively or via
4# plugin.
5#
6# Check https://editorconfig.org for details.
7#
8# Emacs: you need https://github.com/10sr/editorconfig-custom-majormode-el
9# to automatically enable the appropriate major-mode for your files
10# that aren't already caught by your existing config.
11#
12
13root = true
14
15[*]
16end_of_line = lf
17insert_final_newline = true
18charset = utf-8
19
20[*.mak]
21indent_style = tab
22indent_size = 8
23emacs_mode = makefile
24
25[Makefile*]
26indent_style = tab
27indent_size = 8
28emacs_mode = makefile
29
30[*.{c,h,c.inc,h.inc}]
31indent_style = space
32indent_size = 4
33emacs_mode = c
34
35[*.sh]
36indent_style = space
37indent_size = 4
38
39[*.{s,S}]
40indent_style = tab
41indent_size = 8
42emacs_mode = asm
43
44[*.{vert,frag}]
45emacs_mode = glsl
46
47[*.json]
48indent_style = space
49emacs_mode = python
50
51# by default follow QEMU's style
52[*.pl]
53indent_style = space
54indent_size = 4
55emacs_mode = perl
56
57# but user kernel "style" for imported scripts
58[scripts/{kernel-doc,get_maintainer.pl,checkpatch.pl}]
59indent_style = tab
60indent_size = 8
61emacs_mode = perl
62
63