@@ -170,6 +170,7 @@ contexts:
170170 - clear_scopes : 1
171171 - meta_scope : meta.function.identifier.latex
172172 - include : brace-group-end
173+ - include : macro-variables
173174 - match : (\\){{cmdname}}
174175 scope : entity.name.newcommand.latex
175176 captures :
@@ -236,6 +237,7 @@ contexts:
236237 - include : brace-group-end
237238 - include : braces
238239 - include : xparse-newcommand-single-argspec
240+ - include : macro-variables
239241 # not actually allowed, but included here to future-proof highlighting
240242 - include : general-constants
241243 - include : general-commands
@@ -308,6 +310,7 @@ contexts:
308310 xparse-newcommand-args-wrapped-token :
309311 - meta_scope : meta.group.brace.tex
310312 - include : brace-group-end
313+ - include : macro-variables
311314 # either a command
312315 - match : (\\){{cmdname}}{{endcs}}
313316 scope : constant.other.token.latex
@@ -421,6 +424,7 @@ contexts:
421424 set :
422425 - meta_scope : meta.preamble.documentclass.latex meta.group.brace.tex
423426 - include : brace-group-end
427+ - include : macro-variables
424428 - match : ' [A-Za-z[:digit:]-]'
425429 scope : support.class.latex
426430 - include : immediately-pop
@@ -437,6 +441,7 @@ contexts:
437441 set :
438442 - meta_scope : meta.preamble.usepackage.latex meta.group.brace.tex
439443 - include : brace-group-end
444+ - include : macro-variables
440445 - match : ' [A-Za-z[:digit:]-]*'
441446 scope : support.class.latex
442447 - include : immediately-pop
@@ -451,6 +456,7 @@ contexts:
451456 push :
452457 - meta_scope : meta.include.latex
453458 - include : brace-group-end
459+ - include : macro-variables
454460
455461 sections :
456462 - match : |-
@@ -1180,6 +1186,7 @@ contexts:
11801186 - match: '[a-zA-Z0-9\.:/*!^_-]+'
11811187 scope: constant.other.citation.latex
11821188 - include: brace-group-end
1189+ - include: macro-variables
11831190 - match: ''
11841191 pop: 1
11851192 - match : |-
@@ -1202,6 +1209,7 @@ contexts:
12021209 - match: '[a-zA-Z0-9\.:/*!^_-]+'
12031210 scope: constant.other.reference.latex
12041211 - include: brace-group-end
1212+ - include: macro-variables
12051213 - match: ''
12061214 pop: 1
12071215 - match : ((\\)label)(\{)
@@ -1214,6 +1222,7 @@ contexts:
12141222 - match : ' [a-zA-Z0-9\.:/*!^_-]+'
12151223 scope : entity.name.label.latex
12161224 - include : brace-group-end
1225+ - include : macro-variables
12171226
12181227 begin-end-commands :
12191228 - match : ((\\)begin)(\{)\s*(\w*)\*?\s*(\})
@@ -2032,6 +2041,7 @@ contexts:
20322041 - meta_scope: meta.function.newcolumntype.latex
20332042 - include: brace-group-end
20342043 - include: array-preamble
2044+ - include: macro-variables
20352045
20362046
20372047 - match : |-
0 commit comments