File tree 6 files changed +111
-1
lines changed
6 files changed +111
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ const SCOPES: { [lang: string]: string } = {
21
21
yaml : 'source.yaml' ,
22
22
json : 'source.json' ,
23
23
php : 'source.php' ,
24
- graphql : 'source.graphql'
24
+ graphql : 'source.graphql' ,
25
+ liquid : 'text.html.liquid'
25
26
} ;
26
27
27
28
export function getGeneratedGrammar ( grammarPath : string , customBlocks : { [ k : string ] : string } ) : string {
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Vetur supports syntax highlighting for the following languages:
9
9
| ` <template lang="jade"> ` | ` pug ` |
10
10
| ` <template lang="haml"> ` | ` haml ` | [ Better Haml] ( https://marketplace.visualstudio.com/items?itemName=karunamurti.haml ) or [ Ruby Haml] ( https://marketplace.visualstudio.com/items?itemName=vayan.haml ) |
11
11
| ` <template lang="slm"> ` | ` slm ` | [ Slm Syntax] ( https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-slm ) |
12
+ | ` <template lang="liquid"> ` | ` liquid ` | [ Liquid Language Support] ( https://github.com/GingerBear/vscode-liquid ) |
12
13
| ` <style> ` | ` css ` |
13
14
| ` <style lang="postcss"> ` | ` postcss ` |
14
15
| ` <style lang="scss"> ` | ` scss ` |
Original file line number Diff line number Diff line change 13
13
"lint" : " tslint -c tslint.json client/**/*.ts server/**/*.ts scripts/**/*.ts" ,
14
14
"test:server" : " npm run compile && cd server && npm test" ,
15
15
"test:e2e" : " node ./dist/test/codeTestRunner.js" ,
16
+ "test:grammar" : " node ./dist/test/codeTestRunner.js grammar" ,
16
17
"test:lsp" : " node ./dist/test/codeTestRunner.js lsp" ,
17
18
"test:int" : " node ./dist/test/codeTestRunner.js interpolation" ,
18
19
"test" : " run-s lint compile test:server test:e2e" ,
115
116
"text.jade.slm" : " slm" ,
116
117
"text.pug" : " jade" ,
117
118
"text.haml" : " haml" ,
119
+ "text.html.liquid" : " liquid" ,
118
120
"source.css" : " css" ,
119
121
"source.css.scss" : " scss" ,
120
122
"source.css.less" : " less" ,
Original file line number Diff line number Diff line change 290
290
}
291
291
]
292
292
},
293
+ {
294
+ "begin" : " (<)(template)\\ b(?=[^>]*lang=('liquid'|\" liquid\" ))(?![^/>]*/>\\ s*$)" ,
295
+ "beginCaptures" : {
296
+ "1" : {
297
+ "name" : " punctuation.definition.tag.begin.html"
298
+ },
299
+ "2" : {
300
+ "name" : " entity.name.tag.template.html"
301
+ }
302
+ },
303
+ "end" : " (</)(template)(>)" ,
304
+ "endCaptures" : {
305
+ "1" : {
306
+ "name" : " punctuation.definition.tag.begin.html"
307
+ },
308
+ "2" : {
309
+ "name" : " entity.name.tag.template.html"
310
+ },
311
+ "3" : {
312
+ "name" : " punctuation.definition.tag.end.html"
313
+ }
314
+ },
315
+ "patterns" : [
316
+ {
317
+ "include" : " #tag-stuff"
318
+ },
319
+ {
320
+ "contentName" : " text.html.liquid" ,
321
+ "begin" : " (>)" ,
322
+ "beginCaptures" : {
323
+ "1" : {
324
+ "name" : " punctuation.definition.tag.end.html"
325
+ }
326
+ },
327
+ "end" : " (?=</template>)" ,
328
+ "patterns" : [
329
+ {
330
+ "include" : " text.html.liquid"
331
+ }
332
+ ]
333
+ }
334
+ ]
335
+ },
293
336
{
294
337
"begin" : " (<)(template)(?![^/>]*/>\\ s*$)" ,
295
338
"beginCaptures" : {
Original file line number Diff line number Diff line change 204
204
}
205
205
]
206
206
},
207
+ {
208
+ "begin" : " (<)(template)\\ b(?=[^>]*lang=('liquid'|\" liquid\" ))(?![^/>]*/>\\ s*$)" ,
209
+ "beginCaptures" : {
210
+ "1" : {
211
+ "name" : " punctuation.definition.tag.begin.html"
212
+ },
213
+ "2" : {
214
+ "name" : " entity.name.tag.template.html"
215
+ }
216
+ },
217
+ "end" : " (</)(template)(>)" ,
218
+ "endCaptures" : {
219
+ "1" : {
220
+ "name" : " punctuation.definition.tag.begin.html"
221
+ },
222
+ "2" : {
223
+ "name" : " entity.name.tag.template.html"
224
+ },
225
+ "3" : {
226
+ "name" : " punctuation.definition.tag.end.html"
227
+ }
228
+ },
229
+ "patterns" : [
230
+ {
231
+ "include" : " #tag-stuff"
232
+ },
233
+ {
234
+ "contentName" : " text.html.liquid" ,
235
+ "begin" : " (>)" ,
236
+ "beginCaptures" : {
237
+ "1" : {
238
+ "name" : " punctuation.definition.tag.end.html"
239
+ }
240
+ },
241
+ "end" : " (?=</template>)" ,
242
+ "patterns" : [
243
+ {
244
+ "include" : " text.html.liquid"
245
+ }
246
+ ]
247
+ }
248
+ ]
249
+ },
207
250
{
208
251
"begin" : " (<)(template)(?![^/>]*/>\\ s*$)" ,
209
252
"beginCaptures" : {
Original file line number Diff line number Diff line change @@ -101,6 +101,26 @@ patterns:
101
101
patterns :
102
102
- include : text.jade.slm
103
103
104
+ # liquid
105
+ - begin : (<)(template)\b(?=[^>]*lang=('liquid'|"liquid"))(?![^/>]*/>\s*$)
106
+ beginCaptures :
107
+ ' 1 ' : { name: punctuation.definition.tag.begin.html }
108
+ ' 2 ' : { name: entity.name.tag.template.html }
109
+ end : (</)(template)(>)
110
+ endCaptures :
111
+ ' 1 ' : { name: punctuation.definition.tag.begin.html }
112
+ ' 2 ' : { name: entity.name.tag.template.html }
113
+ ' 3 ' : { name: punctuation.definition.tag.end.html }
114
+ patterns :
115
+ - include : ' #tag-stuff'
116
+ - contentName : text.html.liquid
117
+ begin : (>)
118
+ beginCaptures :
119
+ ' 1 ' : { name: punctuation.definition.tag.end.html }
120
+ end : (?=</template>)
121
+ patterns :
122
+ - include : text.html.liquid
123
+
104
124
# html
105
125
- begin : (<)(template)(?![^/>]*/>\s*$)
106
126
beginCaptures :
You can’t perform that action at this time.
0 commit comments