PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.4
Code Block Pro – Beautiful Syntax Highlighting v1.27.4
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / http.tmLanguage.json

http.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.27.4, at build/shiki/languages/http.tmLanguage.json

298 lines 6.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "scopeName": "source.http",
3 "fileTypes": ["http", "rest"],
4 "keyEquivalent": "^~H",
5 "name": "http",
6 "patterns": [
7 {
8 "begin": "^\\s*(?=curl)",
9 "name": "http.request.curl",
10 "end": "^\\s*(\\#{3,}.*?)?\\s*$",
11 "endCaptures": {
12 "0": {
13 "name": "comment.line.sharp.http"
14 }
15 },
16 "patterns": [
17 {
18 "include": "source.shell"
19 }
20 ]
21 },
22 {
23 "begin": "\\s*(?=(\\[|{[^{]))",
24 "name": "http.request.body.json",
25 "end": "^\\s*(\\#{3,}.*?)?\\s*$",
26 "endCaptures": {
27 "0": {
28 "name": "comment.line.sharp.http"
29 }
30 },
31 "patterns": [
32 {
33 "include": "source.json"
34 }
35 ]
36 },
37 {
38 "begin": "^\\s*(?=<\\S)",
39 "name": "http.request.body.xml",
40 "end": "^\\s*(\\#{3,}.*?)?\\s*$",
41 "endCaptures": {
42 "0": {
43 "name": "comment.line.sharp.http"
44 }
45 },
46 "patterns": [
47 {
48 "include": "text.xml"
49 }
50 ]
51 },
52 {
53 "begin": "\\s*(?=(query|mutation))",
54 "name": "http.request.body.graphql",
55 "end": "^\\s*(\\#{3,}.*?)?\\s*$",
56 "endCaptures": {
57 "0": {
58 "name": "comment.line.sharp.http"
59 }
60 },
61 "patterns": [
62 {
63 "include": "source.graphql"
64 }
65 ]
66 },
67 {
68 "begin": "\\s*(?=(query|mutation))",
69 "name": "http.request.body.graphql",
70 "end": "^\\{\\s*$",
71 "patterns": [
72 {
73 "include": "source.graphql"
74 }
75 ]
76 },
77 {
78 "include": "#metadata"
79 },
80 {
81 "include": "#comments"
82 },
83 {
84 "captures": {
85 "1": {
86 "name": "keyword.other.http"
87 },
88 "2": {
89 "name": "variable.other.http"
90 },
91 "3": {
92 "name": "string.other.http"
93 }
94 },
95 "match": "^\\s*(@)([^\\s=]+)\\s*=\\s*(.*?)\\s*$",
96 "name": "http.filevariable"
97 },
98 {
99 "captures": {
100 "1": {
101 "name": "keyword.operator.http"
102 },
103 "2": {
104 "name": "variable.other.http"
105 },
106 "3": {
107 "name": "string.other.http"
108 }
109 },
110 "match": "^\\s*(\\?|&)([^=\\s]+)=(.*)$",
111 "name": "http.query"
112 },
113 {
114 "captures": {
115 "1": {
116 "name": "entity.name.tag.http"
117 },
118 "2": {
119 "name": "keyword.other.http"
120 },
121 "3": {
122 "name": "string.other.http"
123 }
124 },
125 "match": "^([\\w\\-]+)\\s*(\\:)\\s*([^/].*?)\\s*$",
126 "name": "http.headers"
127 },
128 {
129 "include": "#request-line"
130 },
131 {
132 "include": "#response-line"
133 }
134 ],
135 "repository": {
136 "metadata": {
137 "patterns": [
138 {
139 "match": "^\\s*\\#{1,}\\s+(?:((@)name)\\s+([^\\s\\.]+))$",
140 "captures": {
141 "1": {
142 "name": "entity.other.attribute-name"
143 },
144 "2": {
145 "name": "punctuation.definition.block.tag.metadata"
146 },
147 "3": {
148 "name": "entity.name.type.http"
149 }
150 },
151 "name": "comment.line.sharp.http"
152 },
153 {
154 "match": "^\\s*\\/{2,}\\s+(?:((@)name)\\s+([^\\s\\.]+))$",
155 "captures": {
156 "1": {
157 "name": "entity.other.attribute-name"
158 },
159 "2": {
160 "name": "punctuation.definition.block.tag.metadata"
161 },
162 "3": {
163 "name": "entity.name.type.http"
164 }
165 },
166 "name": "comment.line.double-slash.http"
167 },
168 {
169 "match": "^\\s*\\#{1,}\\s+((@)note)\\s*$",
170 "captures": {
171 "1": {
172 "name": "entity.other.attribute-name"
173 },
174 "2": {
175 "name": "punctuation.definition.block.tag.metadata"
176 }
177 },
178 "name": "comment.line.sharp.http"
179 },
180 {
181 "match": "^\\s*\\/{2,}\\s+((@)note)\\s*$",
182 "captures": {
183 "1": {
184 "name": "entity.other.attribute-name"
185 },
186 "2": {
187 "name": "punctuation.definition.block.tag.metadata"
188 }
189 },
190 "name": "comment.line.double-slash.http"
191 },
192 {
193 "match": "^\\s*\\#{1,}\\s+(?:((@)prompt)\\s+([^\\s]+)(?:\\s+(.*))?\\s*)$",
194 "captures": {
195 "1": {
196 "name": "entity.other.attribute-name"
197 },
198 "2": {
199 "name": "punctuation.definition.block.tag.metadata"
200 },
201 "3": {
202 "name": "variable.other.http"
203 },
204 "4": {
205 "name": "string.other.http"
206 }
207 },
208 "name": "comment.line.sharp.http"
209 },
210 {
211 "match": "^\\s*\\/{2,}\\s+(?:((@)prompt)\\s+([^\\s]+)(?:\\s+(.*))?\\s*)$",
212 "captures": {
213 "1": {
214 "name": "entity.other.attribute-name"
215 },
216 "2": {
217 "name": "punctuation.definition.block.tag.metadata"
218 },
219 "3": {
220 "name": "variable.other.http"
221 },
222 "4": {
223 "name": "string.other.http"
224 }
225 },
226 "name": "comment.line.double-slash.http"
227 }
228 ]
229 },
230 "comments": {
231 "patterns": [
232 {
233 "match": "^\\s*\\#{1,}.*$",
234 "name": "comment.line.sharp.http"
235 },
236 {
237 "match": "^\\s*\\/{2,}.*$",
238 "name": "comment.line.double-slash.http"
239 }
240 ]
241 },
242 "request-line": {
243 "captures": {
244 "1": {
245 "name": "keyword.control.http"
246 },
247 "2": {
248 "name": "const.language.http"
249 },
250 "3": {
251 "patterns": [
252 {
253 "include": "#protocol"
254 }
255 ]
256 }
257 },
258 "match": "(?i)^(?:(get|post|put|delete|patch|head|options|connect|trace)\\s+)?\\s*(.+?)(?:\\s+(HTTP\\/\\S+))?$",
259 "name": "http.requestline"
260 },
261 "response-line": {
262 "captures": {
263 "1": {
264 "patterns": [
265 {
266 "include": "#protocol"
267 }
268 ]
269 },
270 "2": {
271 "name": "constant.numeric.http"
272 },
273 "3": {
274 "name": "string.other.http"
275 }
276 },
277 "match": "(?i)^\\s*(HTTP\\/\\S+)\\s([1-5][0-9][0-9])\\s(.*)$",
278 "name": "http.responseLine"
279 },
280 "protocol": {
281 "patterns": [
282 {
283 "captures": {
284 "1": {
285 "name": "keyword.other.http"
286 },
287 "2": {
288 "name": "constant.numeric.http"
289 }
290 },
291 "name": "http.version",
292 "match": "(HTTP)/(\\d+.\\d+)"
293 }
294 ]
295 }
296 }
297 }
298