File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
packages/svelte-vscode/syntaxes Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,8 @@ repository:
215215 { match: each|key, name: keyword.control.svelte },
216216 { match: await|then|catch, name: keyword.control.flow.svelte },
217217 { match: html, name: keyword.other.svelte },
218- { match: debug, name: keyword.other.debugger.svelte }]}
218+ { match: debug, name: keyword.other.debugger.svelte },
219+ { match: const, name: storage.type.svelte }]}
219220
220221 # Scopes special tag _block start nodes_ depending on what type they are, such as `#if` or `#await` blocks.
221222 special-tags-modes :
@@ -226,6 +227,19 @@ repository:
226227 name : meta.embedded.expression.svelte source.ts
227228 patterns : [ include: source.ts ]
228229
230+ # Const.
231+ - begin : (?<=const.*?)\G
232+ end : (?=})
233+ patterns :
234+ # Variable.
235+ - begin : \G\s*([_$[:alpha:]][_$[:alnum:]]+)\s*
236+ end : (?=\=)
237+ beginCaptures : { 1: { name: variable.other.constant.svelte } }
238+ # Expression (starting with "=").
239+ - begin : (?=\=)
240+ end : (?=})
241+ patterns : [ include: source.ts#variable-initializer ]
242+
229243 # Each.
230244 - begin : (?<=each.*?)\G
231245 end : (?=})
You can’t perform that action at this time.
0 commit comments