-
Notifications
You must be signed in to change notification settings - Fork 3
/
Pillar.sublime-syntax
122 lines (94 loc) · 1.96 KB
/
Pillar.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
%YAML 1.2
---
name: Pillar
file_extensions: [pillar]
scope: text.html
contexts:
main:
# Section
- match: ^\s*\!+\b*.+
scope: entity.name.tag
# Note
- match: \@\@note.*
scope: storage.type
# Todo
- match: \@\@todo.*
scope: invalid
# Label
- match: ^\s*\@.+
scope: constant.numeric
# Reference
- match: \*\@.*?\*
scope: variable.function
# Comment
- match: (?<!\\)\%.*
scope: comment
# Table
- match: ^\s*\|.+
scope: constant.numeric
# Monospaced
- match: \=\=.*?\=\=
scope: string
# Bold
- match: \"\".*?\"\"
scope: markup.bold
# Italic
- match: \'\'.*?\'\'
scope: markup.italic
# Ordered list
- match: ^\s*\#
scope: constant.numeric
# Unordered list
- match: ^\s*\-
scope: constant.numeric
# Definition list
- match: ^\s*[:;]
scope: constant.numeric
# Link
- match: \*(?=.+\*)
push: link
# Image
- match: \+(?=.+\>.+\+)
push: image
# Code listing
- match: \[\[\[
push: listing
# LaTeX inline
- match: \{\{\{
push: inline
# Annotation
- match: \$\{
push: annotation
link:
- meta_scope: variable.function
- match: \*
pop: true
- match: \b[^\>\*]+(?=\>)
scope: entity.other.attribute-name
image:
- meta_scope: variable.function
- match: \+
pop: true
- match: \b[^\>\+]+(?=\>)
scope: entity.other.attribute-name
listing:
- meta_scope: string
- match: \]\]\]
pop: true
inline:
- meta_scope: entity.other.attribute-name
- match: \}\}\}
pop: true
annotation:
- meta_scope: entity.other.attribute-name
- match: \}\$
pop: true
# Tag
- match: \A.+(?=\:)
scope: entity.other.attribute-name
# Parameter
- match: \w+(?=\=)
scope: variable.function
# Value
- match: (?<=\=)[^|}]+
scope: string