Repository navigation
Expand file tree
/
Copy pathconfigSchema.json
More file actions
170 lines (170 loc) · 7.16 KB
/
Copy pathconfigSchema.json
File metadata and controls
170 lines (170 loc) · 7.16 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/Config",
"definitions": {
"Config": {
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"languageName": {
"description": "The name of the language. This will be used to display the language in the language selection menu.",
"type": "string"
},
"fileExtensions": {
"type": "array",
"description": "The file extensions that will be associated with this language.",
"items": {
"type": "string"
}
},
"mainGrammarPath": {
"type": "string",
"description": "The relative path to the main grammar file. This file will be used to generate default syntax highlighting rules."
},
"options": {
"description": "Extra syntax highlighting options",
"$ref": "#/definitions/ConfigOptions"
},
"grammar": {
"type": "array",
"description": "The syntax highlighting rules for the language. These rules will be used to generate the syntax highlighting rules for the language.",
"items": {
"$ref": "#/definitions/ConfigGrammar"
}
}
},
"required": [
"$schema",
"languageName",
"fileExtensions"
],
"additionalProperties": false
},
"ConfigOptions": {
"type": "object",
"properties": {
"createLanguageConfigurationFile": {
"description": "Whether or not to create a language configuration file. This file will be used to specify helpful information about the language, such as comments, brackets, auto closing pairs, etc.",
"type": "boolean"
},
"highlightNumbers": {
"description": "Whether or not to highlight numbers.",
"type": "boolean"
}
},
"additionalProperties": false
},
"ConfigGrammar": {
"anyOf": [
{
"$ref": "#/definitions/ConfigBlockComment"
},
{
"$ref": "#/definitions/ConfigGrammarEntry"
}
]
},
"ConfigBlockComment": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "blockComment",
"description": "A block (or multiline) comment in the language. Rather than having a values property, this type has a start and end property. The start property is the text that starts the block comment and the end property is the text that ends the block comment."
},
"begin": {
"type": "string"
},
"end": {
"type": "string"
}
},
"required": [
"type",
"begin",
"end"
],
"additionalProperties": false
},
"ConfigGrammarEntry": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"character",
"comment",
"constant",
"function",
"keyword",
"operator",
"punctuation",
"separator",
"string",
"terminator",
"type"
],
"oneOf": [
{
"const": "character",
"description": "A character in the language. This is typically used to surround a single character and is applied at the beginning and end of every character. The most common example of this is single quotes."
},
{
"const": "comment",
"description": "A single line comment in the language."
},
{
"const": "constant",
"description": "A constant in the language. Examples include true, false, null, etc."
},
{
"const": "function",
"description": "A built-in function in the language. Examples include print, println, etc."
},
{
"const": "keyword",
"description": "A keyword in the language. Examples include if, else, while, etc."
},
{
"const": "operator",
"description": "An operator in the language. Examples include +, -, *, etc."
},
{
"const": "punctuation",
"description": "A punctuation mark in the language. Examples include (, ), {, }, etc."
},
{
"const": "separator",
"description": "A separator in the language, used to separate multiple values but is not applied at the end of the last one. The most common example of this is a comma."
},
{
"const": "string",
"description": "A string in the language. This is typically used to surround text and is applied at the beginning and end of every string. The most common example of this is double quotes."
},
{
"const": "terminator",
"description": "A terminator in the language. This is typically used to terminate a statement and is applied at the end of every statement. The most common example of this is a semicolon."
},
{
"const": "type",
"description": "A type in the language. Examples include int, float, string, etc."
}
]
},
"values": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"type",
"values"
],
"additionalProperties": false
}
}
}