tm-grammars 1.7.2 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,285 @@
1
+ {
2
+ "displayName": "Qt Style Sheets",
3
+ "name": "qss",
4
+ "patterns": [
5
+ {
6
+ "include": "#comment-block"
7
+ },
8
+ {
9
+ "include": "#rule-list"
10
+ },
11
+ {
12
+ "include": "#selector"
13
+ }
14
+ ],
15
+ "repository": {
16
+ "color": {
17
+ "patterns": [
18
+ {
19
+ "begin": "\\b(rgb|rgba|hsv|hsva|hsl|hsla)\\s*\\(",
20
+ "beginCaptures": {
21
+ "1": {
22
+ "name": "entity.name.function.qss"
23
+ }
24
+ },
25
+ "description": "Color Type",
26
+ "end": "\\)",
27
+ "patterns": [
28
+ {
29
+ "include": "#comment-block"
30
+ },
31
+ {
32
+ "include": "#number"
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ "match": "\\b(white|black|red|darkred|green|darkgreen|blue|darkblue|cyan|darkcyan|magenta|darkmagenta|yellow|darkyellow|gray|darkgray|lightgray|transparent|color0|color1)\\b",
38
+ "name": "support.constant.property-value.named-color.qss"
39
+ },
40
+ {
41
+ "match": "#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\\b",
42
+ "name": "support.constant.property-value.color.qss"
43
+ }
44
+ ]
45
+ },
46
+ "comment-block": {
47
+ "patterns": [
48
+ {
49
+ "begin": "/\\*",
50
+ "end": "\\*/",
51
+ "name": "comment.block.qss"
52
+ }
53
+ ]
54
+ },
55
+ "icon-properties": {
56
+ "patterns": [
57
+ {
58
+ "match": "\\b(backward-icon|cd-icon|computer-icon|desktop-icon|dialog-apply-icon|dialog-cancel-icon|dialog-close-icon|dialog-discard-icon|dialog-help-icon|dialog-no-icon|dialog-ok-icon|dialog-open-icon|dialog-reset-icon|dialog-save-icon|dialog-yes-icon|directory-closed-icon|directory-icon|directory-link-icon|directory-open-icon|dockwidget-close-icon|downarrow-icon|dvd-icon|file-icon|file-link-icon|filedialog-contentsview-icon|filedialog-detailedview-icon|filedialog-end-icon|filedialog-infoview-icon|filedialog-listview-icon|filedialog-new-directory-icon|filedialog-parent-directory-icon|filedialog-start-icon|floppy-icon|forward-icon|harddisk-icon|home-icon|leftarrow-icon|messagebox-critical-icon|messagebox-information-icon|messagebox-question-icon|messagebox-warning-icon|network-icon|rightarrow-icon|titlebar-contexthelp-icon|titlebar-maximize-icon|titlebar-menu-icon|titlebar-minimize-icon|titlebar-normal-icon|titlebar-close-icon|titlebar-shade-icon|titlebar-unshade-icon|trash-icon|uparrow-icon)\\b",
59
+ "name": "support.type.property-name.qss"
60
+ }
61
+ ]
62
+ },
63
+ "id-selector": {
64
+ "patterns": [
65
+ {
66
+ "captures": {
67
+ "1": {
68
+ "name": "punctuation.definition.entity.qss"
69
+ },
70
+ "2": {
71
+ "name": "entity.name.tag.qss"
72
+ }
73
+ },
74
+ "match": "(#)([a-zA-Z][a-zA-Z0-9_-]*)"
75
+ }
76
+ ]
77
+ },
78
+ "number": {
79
+ "patterns": [
80
+ {
81
+ "description": "floating number",
82
+ "match": "\\b(\\d+)?\\.(\\d+)\\b",
83
+ "name": "constant.numeric.qss"
84
+ },
85
+ {
86
+ "description": "percentage",
87
+ "match": "\\b(\\d+)%",
88
+ "name": "constant.numeric.qss"
89
+ },
90
+ {
91
+ "description": "length",
92
+ "match": "\\b(\\d+)(px|pt|em|ex)?\\b",
93
+ "name": "constant.numeric.qss"
94
+ },
95
+ {
96
+ "description": "integer",
97
+ "match": "\\b(\\d+)\\b",
98
+ "name": "constant.numeric.qss"
99
+ }
100
+ ]
101
+ },
102
+ "properties": {
103
+ "patterns": [
104
+ {
105
+ "include": "#property-values"
106
+ },
107
+ {
108
+ "match": "\\b(paint-alternating-row-colors-for-empty-area|dialogbuttonbox-buttons-have-icons|titlebar-show-tooltips-on-buttons|messagebox-text-interaction-flags|lineedit-password-mask-delay|outline-bottom-right-radius|lineedit-password-character|selection-background-color|outline-bottom-left-radius|border-bottom-right-radius|alternate-background-color|widget-animation-duration|border-bottom-left-radius|show-decoration-selected|outline-top-right-radius|outline-top-left-radius|border-top-right-radius|border-top-left-radius|background-attachment|subcontrol-position|border-bottom-width|border-bottom-style|border-bottom-color|background-position|border-right-width|border-right-style|border-right-color|subcontrol-origin|border-left-width|border-left-style|border-left-color|background-origin|background-repeat|border-top-width|border-top-style|border-top-color|background-image|background-color|text-decoration|selection-color|background-clip|padding-bottom|outline-radius|outline-offset|image-position|gridline-color|padding-right|outline-style|outline-color|margin-bottom|button-layout|border-radius|border-bottom|padding-left|margin-right|border-width|border-style|border-image|border-color|border-right|padding-top|margin-left|font-weight|font-family|border-left|text-align|min-height|max-height|margin-top|font-style|border-top|background|min-width|max-width|icon-size|font-size|position|spacing|padding|outline|opacity|margin|height|bottom|border|width|right|image|color|left|font|top)\\b",
109
+ "name": "support.type.property-name.qss"
110
+ },
111
+ {
112
+ "include": "#icon-properties"
113
+ }
114
+ ]
115
+ },
116
+ "property-selector": {
117
+ "patterns": [
118
+ {
119
+ "begin": "\\[",
120
+ "end": "\\]",
121
+ "patterns": [
122
+ {
123
+ "include": "#comment-block"
124
+ },
125
+ {
126
+ "include": "#string"
127
+ },
128
+ {
129
+ "match": "\\b[_a-zA-Z]\\w*\\b",
130
+ "name": "variable.parameter.qml"
131
+ }
132
+ ]
133
+ }
134
+ ]
135
+ },
136
+ "property-values": {
137
+ "patterns": [
138
+ {
139
+ "begin": ":",
140
+ "end": ";|(?=\\})",
141
+ "patterns": [
142
+ {
143
+ "include": "#comment-block"
144
+ },
145
+ {
146
+ "include": "#color"
147
+ },
148
+ {
149
+ "begin": "\\b(qlineargradient|qradialgradient|qconicalgradient)\\s*\\(",
150
+ "beginCaptures": {
151
+ "1": {
152
+ "name": "entity.name.function.qss"
153
+ }
154
+ },
155
+ "description": "Gradient Type",
156
+ "end": "\\)",
157
+ "patterns": [
158
+ {
159
+ "include": "#comment-block"
160
+ },
161
+ {
162
+ "match": "\\b(x1|y1|x2|y2|stop|angle|radius|cx|cy|fx|fy)\\b",
163
+ "name": "variable.parameter.qss"
164
+ },
165
+ {
166
+ "include": "#color"
167
+ },
168
+ {
169
+ "include": "#number"
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "begin": "\\b(url)\\s*\\(",
175
+ "beginCaptures": {
176
+ "1": {
177
+ "name": "entity.name.function.qss"
178
+ }
179
+ },
180
+ "contentName": "string.unquoted.qss",
181
+ "description": "URL Type",
182
+ "end": "\\)"
183
+ },
184
+ {
185
+ "match": "\\bpalette\\s*(?=\\()\\b",
186
+ "name": "entity.name.function.qss"
187
+ },
188
+ {
189
+ "match": "\\b(highlighted-text|alternate-base|line-through|link-visited|dot-dot-dash|window-text|button-text|bright-text|underline|no-repeat|highlight|overline|absolute|relative|repeat-y|repeat-x|midlight|selected|disabled|dot-dash|content|padding|oblique|stretch|repeat|window|shadow|button|border|margin|active|italic|normal|outset|groove|double|dotted|dashed|repeat|scroll|center|bottom|light|solid|ridge|inset|fixed|right|text|link|dark|base|bold|none|left|mid|off|top|on)\\b",
190
+ "name": "support.constant.property-value.qss"
191
+ },
192
+ {
193
+ "match": "\\b(true|false)\\b",
194
+ "name": "constant.language.boolean.qss"
195
+ },
196
+ {
197
+ "include": "#string"
198
+ },
199
+ {
200
+ "include": "#number"
201
+ }
202
+ ]
203
+ }
204
+ ]
205
+ },
206
+ "pseudo-states": {
207
+ "patterns": [
208
+ {
209
+ "match": "\\b(active|adjoins-item|alternate|bottom|checked|closable|closed|default|disabled|editable|edit-focus|enabled|exclusive|first|flat|floatable|focus|has-children|has-siblings|horizontal|hover|indeterminate|last|left|maximized|middle|minimized|movable|no-frame|non-exclusive|off|on|only-one|open|next-selected|pressed|previous-selected|read-only|right|selected|top|unchecked|vertical|window)\\b",
210
+ "name": "keyword.control.qss"
211
+ }
212
+ ]
213
+ },
214
+ "rule-list": {
215
+ "patterns": [
216
+ {
217
+ "begin": "\\{",
218
+ "end": "\\}",
219
+ "patterns": [
220
+ {
221
+ "include": "#comment-block"
222
+ },
223
+ {
224
+ "include": "#properties"
225
+ },
226
+ {
227
+ "include": "#icon-properties"
228
+ }
229
+ ]
230
+ }
231
+ ]
232
+ },
233
+ "selector": {
234
+ "patterns": [
235
+ {
236
+ "include": "#stylable-widgets"
237
+ },
238
+ {
239
+ "include": "#sub-controls"
240
+ },
241
+ {
242
+ "include": "#pseudo-states"
243
+ },
244
+ {
245
+ "include": "#property-selector"
246
+ },
247
+ {
248
+ "include": "#id-selector"
249
+ }
250
+ ]
251
+ },
252
+ "string": {
253
+ "description": "String literal with double or signle quote.",
254
+ "patterns": [
255
+ {
256
+ "begin": "'",
257
+ "end": "'",
258
+ "name": "string.quoted.single.qml"
259
+ },
260
+ {
261
+ "begin": "\"",
262
+ "end": "\"",
263
+ "name": "string.quoted.double.qml"
264
+ }
265
+ ]
266
+ },
267
+ "stylable-widgets": {
268
+ "patterns": [
269
+ {
270
+ "match": "\\b(QAbstractScrollArea|QAbstractItemView|QCheckBox|QColumnView|QComboBox|QDateEdit|QDateTimeEdit|QDialog|QDialogButtonBox|QDockWidget|QDoubleSpinBox|QFrame|QGroupBox|QHeaderView|QLabel|QLineEdit|QListView|QListWidget|QMainWindow|QMenu|QMenuBar|QMessageBox|QProgressBar|QPlainTextEdit|QPushButton|QRadioButton|QScrollBar|QSizeGrip|QSlider|QSpinBox|QSplitter|QStatusBar|QTabBar|QTabWidget|QTableView|QTableWidget|QTextEdit|QTimeEdit|QToolBar|QToolButton|QToolBox|QToolTip|QTreeView|QTreeWidget|QWidget)\\b",
271
+ "name": "entity.name.type.qss"
272
+ }
273
+ ]
274
+ },
275
+ "sub-controls": {
276
+ "patterns": [
277
+ {
278
+ "match": "\\b(add-line|add-page|branch|chunk|close-button|corner|down-arrow|down-button|drop-down|float-button|groove|indicator|handle|icon|item|left-arrow|left-corner|menu-arrow|menu-button|menu-indicator|right-arrow|pane|right-corner|scroller|section|separator|sub-line|sub-page|tab|tab-bar|tear|tearoff|text|title|up-arrow|up-button)\\b",
279
+ "name": "entity.other.inherited-class.qss"
280
+ }
281
+ ]
282
+ }
283
+ },
284
+ "scopeName": "source.qss"
285
+ }