This repository has been archived by the owner on Jul 16, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Slate.JSON-tmLanguage
155 lines (153 loc) · 5.67 KB
/
Slate.JSON-tmLanguage
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
{ "name": "Slate",
"comment": "FIXME: all of the operations have undefined highlighting for their arguments. Reserved keywords for arithmetic not highlighted, either",
"scopeName": "source.slate",
"fileTypes": ["slate"],
"patterns": [
{
"name": "comment",
"match": "#.*"
},
{
"comment": "the 'config' directive",
"begin": "^\\s*(config)\\s+", "end": "$",
"captures": { "1": { "name": "constant.language" } },
"patterns": [
{
"begin": "(defaultToCurrentScreen|repeatOnHoldOps|secondsBeforeRepeat|secondsBetweenRepeat|checkDefaultsOnLoad|orderScreensLeftToRight|keyboardLayout|modalEscapeKey|nudgePercentOf|resizePercentOf|focusCheckWidth|focusCheckWidthMax|focusPreferSameApp|windowHintsBackgroundColor|windowHintsWidth|windowHintsHeight|windowHintsFontColor|windowHintsFontName|windowHintsFontSize|windowHintsDuration|windowHintsRoundedCornerSize|windowHintsIgnoreHiddenWindows|windowHintsTopLeftX|windowHintsTopLeftY|windowHintsOrder|windowHintsShowIcons|windowHintsSpread|windowHintsSpreadSearchWidth|windowHintsSpreadSearchHeight|windowHintsSpreadPadding|snapshotTitleMatch|snapshotMaxStackSize|gridBackgroundColor|gridRoundedCornerSize|gridCellBackgroundColor|gridCellSelectedColor|gridCellRoundedCornerSize|layoutFocusOnActivate|undoMaxStackSize|undoOps|switchIconSize|switchIconPadding|switchBackgroundColor|switchSelectedBackgroundColor|switchSelectedBorderColor|switchSelectedBorderSize|switchRoundedCornerSize|switchOrientation|switchSecondsBeforeRepeat|switchSecondsBetweenRepeat|switchStopRepeatAtEdge|switchOnlyFocusMainWindow|switchShowTitles|switchFontColor|switchFontName|switchFontSize|switchSelectedPadding)", "end": "$",
"captures": {
"1": { "name": "variable.language" }
},
"patterns": [
{ "include": "#variables" },
{ "include": "#constants" },
{
"name": "string.quoted.single",
"match": "."
}
]
}
]
},
{
"comment": "the 'alias' directive",
"begin": "^\\s*(alias)\\s+", "end": "$",
"captures": { "1": { "name": "constant.language" } },
"patterns": [
{
"begin": "([^\\s]+)\\s*(.*)", "end": "$",
"captures": {
"1": { "name": "variable.other" },
"2": { "name": "string.quoted.double" }
}
}
]
},
{
"comment": "the 'layout' directive",
"begin": "^\\s*(layout)\\s+", "end": "$",
"captures": { "1": { "name": "constant.language" } },
"patterns": [
{
"begin": "([^\\s]+)\\s+('[^']+')(:(IGNORE_FAIL|REPEAT|MAIN_FIRST|MAIN_LAST|SORT_TITLE|TITLE_ORDER=\\w+|,)+)?", "end": "$",
"captures": {
"1": { "name": "variable.other" },
"2": { "name": "string.quoted.single" },
"3": { "name": "variable.other" }
},
"patterns": [
{ "include": "#variables" },
{ "include": "#layout_operations"}
]
}
]
},
{
"comment": "the 'default' directive",
"begin": "^\\s*(default)\\s+", "end": "$",
"captures": { "1": { "name": "constant.language" } },
"patterns": [
{
"begin": "([^\\s]+)\\s*", "end": "$",
"captures": {
"1": { "name": "variable.other" }
},
"patterns": [
{
"begin": "(resolutions|count):", "end": "$",
"captures": {
"1": { "name": "variable.other" }
},
"patterns": [
{ "include": "#variables" },
{ "name": "string.quoted.single", "match": "." }
]
}
]
}
]
},
{
"comment": "the 'bind' directive",
"begin": "^\\s*(bind)\\s+", "end": "$",
"captures": { "1": { "name": "constant.language" } },
"patterns": [
{
"begin": "(\\w+):", "end": "\\s+",
"captures": {
"1": { "name": "variable.other" }
},
"patterns": [
{
"match": "(ctrl|alt|cmd|shift|fn)",
"name": "constant.language"
}
]
},
{
"begin": "\\s*", "end": "$",
"patterns": [
{ "include": "#layout_operations" },
{ "include": "#bind_operations" }
]
}
]
},
{
"comment": "the 'source' directive",
"begin": "^\\s*(source)\\s+", "end": "$",
"captures": { "1": { "name": "constant.language" } },
"patterns": [
{
"begin": "(.+?)( if_exists)?$", "end": "$",
"captures": {
"1": { "name": "variable.other" },
"2": { "name": "constant.language" }
}
}
]
}
],
"repository": {
"variables": {
"name": "variable.other",
"match": "\\$\\{[^\\s]+\\}"
},
"builtin-variables": {
"name": "variable.language",
"match": "\\b((screenOrigin|screenSize|windowTopLeft|windowSize|newWindowSize)[XY]|windowHintsWidth|windowHintsHeight)\\b"
},
"constants": {
"name": "constant.language",
"match": "(true|false|windowSize|screenSize|resize|nudge|leftToRight|rightToLeft|horizontal|vertical|app|window|dvorak|qwerty|levenshtein|sequential)"
},
"layout_operations": {
"name": "constant.language",
"match": "(move|resize|push|nudge|throw|corner)"
},
"bind_operations": {
"name": "constant.language",
"match": "(shell|hide|show|toggle|chain|sequence|layout|focus|snapshot|delete-snapshot|activate-snapshot|hint|grid|relaunch|switch)"
}
},
"uuid": "b043d141-90d5-462c-86d3-3885ea68fe23"
}