...
1root = true
2
3[*]
4end_of_line = lf
5charset = utf-8
6trim_trailing_whitespace = true
7insert_final_newline = true
8
9; JSON ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10
11[*.json]
12insert_final_newline = false
13indent_style = space
14indent_size = 4
15
16[package.json]
17; The various tools (npm, yarn, ...) that edit package.json files all
18; seem to use 2-space indent, not 4.
19indent_size = 2
20
21; YAML ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22
23[{*.yaml,*.yml}]
24indent_style = space
25indent_size = 2
26
27; Python ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
28
29[*.py]
30indent_style = space
31indent_size = 4
32; Flynn's style is to wrap things at 100 columns, so mimic that.
33max_line_length = 100
34
35; Go ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
36
37[*.go]
38indent_style = tab
39; mimic gofmt's go/printer.printer.funcBody().maxSize
40max_line_length = 100
41; mimic gofmt's cmd/gofmt.tabWidth
42tab_width = 8
43
44[{go.mod,go.sum}]
45indent_style = tab
46
47; Misc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
48
49[{Makefile,*.mk}]
50; If somehow this gets set to not-tab, then the resulting Makefile
51; won't work.
52indent_style = tab
53
54[*.sh]
55indent_style = space
56indent_size = 4
57[docker-promote.sh]
58indent_style = tab
59indent_size = 8
60tab_width = 8
61
62[*.el]
63indent_style = space
64
65[*.js]
66indent_style = tab
67
68[*.md]
69; Emacs markdown-mode gets mixed tabs/spaces wrong, and so I have zero
70; faith that any other tool gets it right.
71indent_style = space
72
73[*.proto]
74indent_style = space
75indent_size = 2
View as plain text