-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nv.tmLanguage.json
136 lines (124 loc) · 2.85 KB
/
nv.tmLanguage.json
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
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "nv",
"scopeName": "source.nv",
"patterns": [
{
"include": "#literals"
},
{
"include": "#modifiers"
},
{
"include": "#var-declarations"
},
{
"include": "#attributes"
},
{
"include": "#module-declarations"
},
{
"include": "#provider-declarations"
},
{
"include": "#storage-keywords"
},
{
"include": "#types"
}
],
"repository": {
"literals": {
"patterns": [
{ "include": "#strings" },
{
"include": "#numbers"
},
{
"include": "#booleans"
}
]
},
"strings": {
"name": "string.quoted.double.nv",
"begin": "\"",
"end": "\"",
"patterns": [{ "name": "constant.character.escape.nv", "match": "\\\\." }]
},
"numbers": {
"name": "constant.numeric.nv",
"match": "\\d"
},
"booleans": {
"name": "constant.language.bool.nv",
"match": "\\b(true|false)\\b"
},
"modifiers": {
"name": "storage.modifier.nv",
"match": "\\b(pub)\\b"
},
"storage-keywords": {
"name": "storage.type.nv",
"match": "\\b(var|module|provider)\\b"
},
"var-declarations": {
"name": "meta.declarations.var.nv",
"match": "\\b(var)\\b\\s*([a-zA-Z0-9_]+):?\\s*{?",
"patterns": [],
"captures": {
"1": {
"patterns": [{ "include": "#storage-keywords" }]
},
"2": {
"name": "entity.name.function.var_name.nv"
}
}
},
"attributes": {
"name": "meta.declarations.attributes.nv",
"match": "([a-z_]+)\\s*=\\s*(.+)",
"captures": {
"1": {
"name": "variable.parameter"
},
"2": {
"patterns": [{ "include": "#literals" }]
}
}
},
"module-declarations": {
"name": "meta.declarations.module.nv",
"match": "\\b(module)\\b\\s*([A-Z]{1,}[a-zA-Z]+):?\\s*{?",
"patterns": [{ "include": "#storage-keywords" }],
"captures": {
"1": {
"patterns": [{ "include": "#storage-keywords" }]
},
"2": {
"name": "entity.name.type.module_name.nv"
}
}
},
"provider-declarations": {
"name": "meta.declarations.var.nv",
"match": "\\b(provider)\\b\\s*([a-zA-Z_]+):?\\s*([a-z_]+)s*{?",
"patterns": [],
"captures": {
"1": {
"patterns": [{ "include": "#storage-keywords" }]
},
"2": {
"name": "entity.name.function.provider_name.nv"
},
"3": {
"name": "support.type.provider_type.nv"
}
}
},
"types": {
"name": "support.type.nv",
"match": "\\b(str|url|int|float|bool|nowt)\\b"
}
}
}