-
Notifications
You must be signed in to change notification settings - Fork 0
/
Idyll.sublime-syntax
129 lines (111 loc) · 2.78 KB
/
Idyll.sublime-syntax
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
%YAML 1.2
---
name: Idyll
file_extensions:
- idl
- idyl
- idyll
scope: source.idyll
contexts:
main:
- include: comments
- include: components
- include: markdown
comments:
- match: '[^\:]\/\/'
scope: punctuation.definition.comment.line.idyll
push:
- meta_scope: comment.line.idyll
- match: $\n?
pop: true
- match: '\/\*'
scope: punctuation.definition.comment.block.idyll
push:
- meta_scope: comment.block.idyll
- match: '\*\/'
scope: punctuation.definition.comment.block.end
pop: true
components:
- include: componentopen
- include: componentclose
componentopen:
- match: '(\[)([\w\.]+)'
captures:
1: punctuation.definition.tag.begin.idyll
2: entity.name.tag.idyll
push:
- meta_scope: component.open.idyll
- include: idyllattributes
- match: '(\])'
captures:
1: punctuation.definition.tag.end.idyll
pop: true
componentclose:
- match: '(\[\/)(\w.+)(\])'
captures:
0: component.close.idyll
1: punctuation.definition.tag.begin.idyll
2: entity.name.tag.idyll
3: punctuation.definition.tag.end.idyll
pop: true
idyllattributes:
- include: expressions
- include: strings
- include: numbers
- include: props
expressions:
- match: '`'
embed: Packages/JavaScript/JavaScript.sublime-syntax
embed_scope: source.idyll.expressions
escape: '`'
strings:
- match: '"'
scope: punctuation.definition.string.begin
push:
- meta_scope: string.quoted.double.idyll
- match: '"'
scope: punctuation.definition.string.end
pop: true
numbers:
- match: '\d*'
scope: constant.numeric.idyll
props:
- match: '\w*:'
scope: entity.other.attribute-name
markdown:
- include: headers
- include: bold
- include: italics
- include: numberedlists
- include: unnumberedlists
headers:
- match: '^[\s]{0,3}\#{1,6}\s+[^#]*'
scope: markup.heading.idyll
bold:
- match: '\*\*[^\s]'
push:
- meta_scope: markup.bold.idyll
- match: '[^\s]\*\*'
pop: true
- match: '\_\_[^\s]'
push:
- meta_scope: markup.bold.idyll
- match: '[^\s]\_\_'
pop: true
italics:
- match: '\*[^\s]'
push:
- meta_scope: markup.italic.idyll
- match: '[^\s]\*'
pop: true
- match: '\_[^\s\_]'
push:
- meta_scope: markup.italic.idyll
- match: '[^\s\_]\_'
pop: true
numberedlists:
- match: '^[\s]*\d+\.\s+'
scope: markup.list.numbered.idyll
unnumberedlists:
- match: '^[\s]*\*\s+'
scope: markup.list.unnumbered.idyll