PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.2
Code Block Pro – Beautiful Syntax Highlighting v1.27.2
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 / haml.tmLanguage.json

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

597 lines 13.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "fileTypes": ["haml", "html.haml"],
3 "foldingStartMarker": "^\\s*([-%#\\:\\.\\w\\=].*)\\s$",
4 "foldingStopMarker": "^\\s*$",
5 "keyEquivalent": "^~H",
6 "name": "haml",
7 "patterns": [
8 {
9 "begin": "^(\\s*)==",
10 "contentName": "string.quoted.double.ruby",
11 "end": "$\\n*",
12 "patterns": [
13 {
14 "include": "#interpolated_ruby"
15 }
16 ]
17 },
18 {
19 "begin": "^(\\s*):ruby",
20 "end": "^(?!\\1\\s+|$\\n*)",
21 "name": "source.ruby.embedded.filter.haml",
22 "patterns": [
23 {
24 "include": "source.ruby"
25 }
26 ]
27 },
28 {
29 "captures": {
30 "1": {
31 "name": "punctuation.definition.prolog.haml"
32 }
33 },
34 "match": "^(!!!)($|\\s.*)",
35 "name": "meta.prolog.haml"
36 },
37 {
38 "begin": "^(\\s*):javascript",
39 "end": "^(?!\\1\\s+|$\\n*)",
40 "name": "js.haml",
41 "patterns": [
42 {
43 "include": "source.js"
44 }
45 ]
46 },
47 {
48 "begin": "^(\\s*)%script",
49 "end": "^(?!\\1\\s+|$\\n*)",
50 "name": "js.inline.haml",
51 "patterns": [
52 {
53 "include": "source.js"
54 }
55 ]
56 },
57 {
58 "begin": "^(\\s*):ruby$",
59 "end": "^(?!\\1\\s+|$\\n*)",
60 "name": "source.ruby.embedded.filter.haml",
61 "patterns": [
62 {
63 "include": "source.ruby"
64 }
65 ]
66 },
67 {
68 "captures": {
69 "1": {
70 "name": "punctuation.section.comment.haml"
71 }
72 },
73 "match": "^(\\s*)(\\/\\[[^\\]].*?$\\n?)",
74 "name": "comment.line.slash.haml"
75 },
76 {
77 "begin": "^(\\s*)(\\-\\#|\\/|\\-\\s*\\/\\*+)",
78 "beginCaptures": {
79 "2": {
80 "name": "punctuation.section.comment.haml"
81 }
82 },
83 "end": "^(?!\\1\\s+|\\n)",
84 "name": "comment.block.haml",
85 "patterns": [
86 {
87 "include": "text.haml"
88 }
89 ]
90 },
91 {
92 "begin": "^\\s*(?:((%)([-\\w:]+))|(?=\\.|#))",
93 "end": "$|(?!\\.|#|\\{|\\(|\\[|&|=|-|~|!=|&=|/)",
94 "captures": {
95 "1": {
96 "name": "meta.tag.haml"
97 },
98 "2": {
99 "name": "punctuation.definition.tag.haml"
100 },
101 "3": {
102 "name": "entity.name.tag.haml"
103 }
104 },
105 "patterns": [
106 {
107 "begin": "==",
108 "contentName": "string.quoted.double.ruby",
109 "end": "$\\n?",
110 "patterns": [
111 {
112 "include": "#interpolated_ruby"
113 }
114 ]
115 },
116 {
117 "captures": {
118 "1": {
119 "name": "entity.other.attribute-name.class"
120 }
121 },
122 "match": "(\\.[\\w\\-\\:]+)",
123 "name": "meta.selector.css"
124 },
125 {
126 "captures": {
127 "1": {
128 "name": "entity.other.attribute-name.id"
129 }
130 },
131 "match": "(#[\\w-]+)",
132 "name": "meta.selector.css"
133 },
134 {
135 "begin": "(?<!\\#)\\{(?=.*(,|(do)|\\{|\\}|\\||(\\#.*)|\\R)\\s*)",
136 "end": "\\s*\\}(?!\\s*\\,)(?!\\s*\\|)(?!\\#\\{.*\\})",
137 "name": "meta.section.attributes.haml",
138 "patterns": [
139 {
140 "include": "source.ruby"
141 },
142 {
143 "include": "#continuation"
144 },
145 {
146 "include": "#rubyline"
147 }
148 ]
149 },
150 {
151 "begin": "\\(",
152 "end": "\\)",
153 "name": "meta.section.attributes.plain.haml",
154 "patterns": [
155 {
156 "match": "([\\w-]+)",
157 "name": "constant.other.symbol.ruby"
158 },
159 {
160 "match": "\\=",
161 "name": "punctuation"
162 },
163 {
164 "include": "#variables"
165 },
166 {
167 "begin": "\"",
168 "end": "\"",
169 "name": "string.quoted.double.ruby",
170 "patterns": [
171 {
172 "match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",
173 "name": "constant.character.escape.ruby"
174 },
175 {
176 "include": "#interpolated_ruby"
177 }
178 ]
179 },
180 {
181 "include": "#interpolated_ruby"
182 }
183 ]
184 },
185 {
186 "begin": "\\[(?=.+(,|\\[|\\]|\\||(\\#.*))\\s*)",
187 "end": "\\s*\\](?!.*(?!\\#\\[)\\])",
188 "name": "meta.section.object.haml",
189 "patterns": [
190 {
191 "include": "source.ruby"
192 },
193 {
194 "include": "#continuation"
195 },
196 {
197 "include": "#rubyline"
198 }
199 ]
200 },
201 {
202 "include": "#interpolated_ruby_line"
203 },
204 {
205 "include": "#rubyline"
206 },
207 {
208 "match": "/",
209 "name": "punctuation.terminator.tag.haml"
210 }
211 ]
212 },
213 {
214 "begin": "^(\\s*):(ruby|opal)$",
215 "end": "^(?!\\1\\s+|$\\n*)",
216 "name": "source.ruby.embedded.filter.haml",
217 "patterns": [
218 {
219 "include": "source.ruby"
220 }
221 ]
222 },
223 {
224 "begin": "^(\\s*):ruby$",
225 "end": "^(?!\\1\\s+|$\\n*)",
226 "name": "source.ruby.embedded.filter.haml",
227 "patterns": [
228 {
229 "include": "source.ruby"
230 }
231 ]
232 },
233 {
234 "begin": "^(\\s*):(style|sass)$",
235 "end": "^(?=\\1\\s+|$\\n*)",
236 "name": "source.sass.embedded.filter.haml",
237 "patterns": [
238 {
239 "include": "source.sass"
240 }
241 ]
242 },
243 {
244 "begin": "^(\\s*):coffee(script)?",
245 "end": "^(?!\\1\\s+|$\\n*)",
246 "name": "source.coffee.embedded.filter.haml",
247 "patterns": [
248 {
249 "include": "source.coffee"
250 }
251 ]
252 },
253 {
254 "begin": "^(\\s*):plain$",
255 "end": "^(?=\\1\\s+|$\\n*)",
256 "name": "text.plain.embedded.filter.haml",
257 "patterns": [
258 {
259 "include": "text.plain"
260 }
261 ]
262 },
263 {
264 "begin": "^(\\s*)(:ruby)",
265 "beginCaptures": {
266 "2": {
267 "name": "keyword.control.filter.haml"
268 }
269 },
270 "end": "(?m:(?<=\\n)(?!\\1\\s+|$\\n*))",
271 "name": "source.ruby.embedded.filter.haml",
272 "patterns": [
273 {
274 "include": "source.ruby"
275 }
276 ]
277 },
278 {
279 "begin": "^(\\s*)(:sass)",
280 "beginCaptures": {
281 "2": {
282 "name": "keyword.control.filter.haml"
283 }
284 },
285 "end": "^(?!\\1\\s+|$\\n*)",
286 "name": "source.embedded.filter.sass",
287 "patterns": [
288 {
289 "include": "source.sass"
290 }
291 ]
292 },
293 {
294 "begin": "^(\\s*):(styles|sass)$",
295 "end": "^(?=\\1\\s+|$\\n*)",
296 "name": "source.sass.embedded.filter.haml",
297 "patterns": [
298 {
299 "include": "source.sass"
300 }
301 ]
302 },
303 {
304 "begin": "^(\\s*):plain$",
305 "end": "^(?=\\1\\s+|$\\n*)",
306 "name": "text.plain.embedded.filter.haml",
307 "patterns": [
308 {
309 "include": "text.plain"
310 }
311 ]
312 },
313 {
314 "captures": {
315 "1": {
316 "name": "meta.escape.haml"
317 }
318 },
319 "match": "^\\s*(\\.)"
320 },
321 {
322 "begin": "^\\s*(?==|-|~|!=|&=)",
323 "end": "$",
324 "patterns": [
325 {
326 "include": "#interpolated_ruby_line"
327 },
328 {
329 "include": "#rubyline"
330 }
331 ]
332 },
333 {
334 "begin": "^(\\s*)(:php)",
335 "end": "^(?!\\1\\s+|$\\n*)",
336 "name": "meta.embedded.php",
337 "captures": {
338 "2": {
339 "name": "entity.name.tag.haml"
340 }
341 },
342 "patterns": [
343 {
344 "include": "text.html.php#language"
345 }
346 ]
347 },
348 {
349 "begin": "^(\\s*)(:markdown)",
350 "end": "^(?!\\1\\s+|$\\n*)",
351 "name": "meta.embedded.markdown",
352 "captures": {
353 "2": {
354 "name": "entity.name.tag.haml"
355 }
356 },
357 "patterns": [
358 {
359 "include": "text.html.markdown"
360 }
361 ]
362 },
363 {
364 "begin": "^(\\s*)(:(css|styles?))$",
365 "end": "^(?!\\1\\s+|$\\n*)",
366 "name": "meta.embedded.css",
367 "captures": {
368 "2": {
369 "name": "entity.name.tag.haml"
370 }
371 },
372 "patterns": [
373 {
374 "include": "source.css"
375 }
376 ]
377 },
378 {
379 "begin": "^(\\s*)(:sass)$",
380 "end": "^(?!\\1\\s+|$\\n*)",
381 "name": "meta.embedded.sass",
382 "captures": {
383 "2": {
384 "name": "entity.name.tag.haml"
385 }
386 },
387 "patterns": [
388 {
389 "include": "source.sass"
390 }
391 ]
392 },
393 {
394 "begin": "^(\\s*)(:scss)$",
395 "end": "^(?!\\1\\s+|$\\n*)",
396 "name": "meta.embedded.scss",
397 "captures": {
398 "2": {
399 "name": "entity.name.tag.haml"
400 }
401 },
402 "patterns": [
403 {
404 "include": "source.scss"
405 }
406 ]
407 }
408 ],
409 "repository": {
410 "continuation": {
411 "captures": {
412 "1": {
413 "name": "punctuation.separator.continuation.haml"
414 }
415 },
416 "match": "(\\|)\\s*\\n"
417 },
418 "interpolated_ruby": {
419 "patterns": [
420 {
421 "captures": {
422 "0": {
423 "name": "punctuation.section.embedded.ruby"
424 },
425 "1": {
426 "name": "source.ruby.embedded.source.empty"
427 }
428 },
429 "match": "#\\{(\\})",
430 "name": "source.ruby.embedded.source"
431 },
432 {
433 "begin": "#\\{",
434 "captures": {
435 "0": {
436 "name": "punctuation.section.embedded.ruby"
437 }
438 },
439 "end": "(\\})",
440 "name": "source.ruby.embedded.source",
441 "patterns": [
442 {
443 "include": "#nest_curly_and_self"
444 },
445 {
446 "include": "source.ruby"
447 }
448 ]
449 },
450 {
451 "include": "#variables"
452 }
453 ]
454 },
455 "interpolated_ruby_line": {
456 "begin": "!?==",
457 "contentName": "string.source.ruby.embedded.haml",
458 "end": "$",
459 "name": "meta.line.ruby.interpolated.haml",
460 "patterns": [
461 {
462 "include": "#interpolated_ruby"
463 },
464 {
465 "include": "source.ruby#escaped_char"
466 }
467 ]
468 },
469 "nest_curly_and_self": {
470 "patterns": [
471 {
472 "begin": "\\{",
473 "captures": {
474 "0": {
475 "name": "punctuation.section.scope.ruby"
476 }
477 },
478 "end": "\\}",
479 "patterns": [
480 {
481 "include": "#nest_curly_and_self"
482 },
483 {
484 "include": "source.ruby"
485 }
486 ]
487 }
488 ]
489 },
490 "variables": {
491 "patterns": [
492 {
493 "captures": {
494 "1": {
495 "name": "punctuation.definition.variable.ruby"
496 }
497 },
498 "match": "(#@)[a-zA-Z_]\\w*",
499 "name": "variable.other.readwrite.instance.ruby"
500 },
501 {
502 "captures": {
503 "1": {
504 "name": "punctuation.definition.variable.ruby"
505 }
506 },
507 "match": "(#@@)[a-zA-Z_]\\w*",
508 "name": "variable.other.readwrite.class.ruby"
509 },
510 {
511 "captures": {
512 "1": {
513 "name": "punctuation.definition.variable.ruby"
514 }
515 },
516 "match": "(#\\$)[a-zA-Z_]\\w*",
517 "name": "variable.other.readwrite.global.ruby"
518 }
519 ]
520 },
521 "rubyline": {
522 "begin": "(&amp|!)?(=|-|~)",
523 "contentName": "source.ruby.embedded.haml",
524 "end": "((do|\\{)( \\|[.*]+\\|)?)$|$|^(?!.*\\|\\s*)$\\n?",
525 "endCaptures": {
526 "1": {
527 "name": "source.ruby.embedded.html"
528 },
529 "2": {
530 "name": "keyword.control.ruby.start-block"
531 }
532 },
533 "name": "meta.line.ruby.haml",
534 "patterns": [
535 {
536 "match": "\\s+((elseif|foreach|switch|declare|default|use))(?=\\s|\\()",
537 "captures": {
538 "1": {
539 "name": "keyword.control.php"
540 }
541 }
542 },
543 {
544 "match": "\\s+(require_once|include_once)(?=\\s|\\()",
545 "captures": {
546 "1": {
547 "name": "keyword.control.import.include.php"
548 }
549 }
550 },
551 {
552 "match": "\\s+(catch|try|throw|exception|finally|die)(?=\\s|\\(|\\n*)",
553 "name": "keyword.control.exception.php"
554 },
555 {
556 "match": "\\s+(function\\s*)((?=\\())",
557 "captures": {
558 "1": {
559 "name": "storage.type.function.php"
560 }
561 }
562 },
563 {
564 "match": "\\s+(use\\s*)((?=\\())",
565 "captures": {
566 "1": {
567 "name": "keyword.control.php"
568 }
569 }
570 },
571 {
572 "match": "(\\||,|<|do|\\{)\\s*(\\#.*)?$\\n*",
573 "name": "source.ruby",
574 "patterns": [
575 {
576 "include": "#rubyline"
577 }
578 ]
579 },
580 {
581 "comment": "Hack to let ruby comments work in this context properly",
582 "match": "#.*$",
583 "name": "comment.line.number-sign.ruby"
584 },
585 {
586 "include": "source.ruby"
587 },
588 {
589 "include": "#continuation"
590 }
591 ]
592 }
593 },
594 "scopeName": "text.haml",
595 "uuid": "3D727049-DD05-45DF-92A5-D50EA36FD035"
596 }
597