@@ -159,7 +159,9 @@ function initDecorations(): Map<string, vscode.TextEditorDecorationType> {
159
159
const theme = ColorTheme . load ( ) ;
160
160
const res = new Map ( ) ;
161
161
TAG_TO_SCOPES . forEach ( ( scopes , tag ) => {
162
- if ( ! scopes ) throw `unmapped tag: ${ tag } ` ;
162
+ // We are going to axe this soon, so don't try to detect unknown tags.
163
+ // Users should switch to the new semantic tokens implementation.
164
+ if ( ! scopes ) return ;
163
165
const rule = theme . lookup ( scopes ) ;
164
166
const decor = createDecorationFromTextmate ( rule ) ;
165
167
res . set ( tag , decor ) ;
@@ -211,7 +213,7 @@ const TAG_TO_SCOPES = new Map<string, string[]>([
211
213
[ "macro" , [ "entity.name.macro" ] ] ,
212
214
213
215
[ "variable" , [ "variable" ] ] ,
214
- [ "variable.mut " , [ "variable" , "meta.mutable" ] ] ,
216
+ [ "variable.mutable " , [ "variable" , "meta.mutable" ] ] ,
215
217
216
218
[ "type" , [ "entity.name.type" ] ] ,
217
219
[ "type.builtin" , [ "entity.name.type" , "support.type.primitive" ] ] ,
@@ -221,10 +223,10 @@ const TAG_TO_SCOPES = new Map<string, string[]>([
221
223
222
224
[ "literal.byte" , [ "constant.character.byte" ] ] ,
223
225
[ "literal.char" , [ "constant.character.rust" ] ] ,
224
- [ "literal.numeric " , [ "constant.numeric" ] ] ,
226
+ [ "numeric_literal " , [ "constant.numeric" ] ] ,
225
227
226
228
[ "comment" , [ "comment" ] ] ,
227
- [ "string " , [ "string.quoted" ] ] ,
229
+ [ "string_literal " , [ "string.quoted" ] ] ,
228
230
[ "attribute" , [ "meta.attribute.rust" ] ] ,
229
231
230
232
[ "keyword" , [ "keyword" ] ] ,
0 commit comments