aboutsummaryrefslogtreecommitdiff
path: root/misc/odinfmt.schema.json
blob: 600bea3ff7e0360d2f1506320530fc95f54bb3c0 (plain)
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
{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"type": "object",
	"properties": {
		"character_width": {
			"type": "integer",
			"default": 100,
			"description": "How many characters it takes before it line breaks it."
		},
		"spaces": {
			"type": "integer",
			"default": 4,
			"description": "Spaces per indentation"
		},
		"newline_limit": {
			"type": "integer",
			"default": 2,
			"description": "The limit of newlines between statements and declarations."
		},
		"tabs": {
			"type": "boolean",
			"default": true,
			"description": "Use tabs instead of spaces"
		},
		"tabs_width": {
			"type": "integer",
			"default": 4,
			"description": "How many characters one tab represents"
		},
		"convert_do": {
			"type": "boolean",
			"default": false,
			"description": "Convert all do statements to brace blocks"
		},
		"exp_multiline_composite_literals": {
			"type": "boolean",
			"default": false,
			"description": "Experimental: Composite literals that span multiple lines are not forcibly inlined"
		},
		"brace_style": {
			"type": "string",
			"enum": ["_1TBS", "Allman", "Stroustrup", "K_And_R"],
			"default": "_1TBS"
		},
		"indent_cases": {
			"type": "boolean",
			"default": false
		},
		"newline_style": {
			"type": "string",
			"enum": ["CRLF", "LF"],
			"default": "CRLF"
		}
	},
	"required": []
}