@@ -159,7 +159,9 @@ function initDecorations(): Map<string, vscode.TextEditorDecorationType> {
159159 const theme = ColorTheme . load ( ) ;
160160 const res = new Map ( ) ;
161161 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 ;
163165 const rule = theme . lookup ( scopes ) ;
164166 const decor = createDecorationFromTextmate ( rule ) ;
165167 res . set ( tag , decor ) ;
@@ -211,7 +213,7 @@ const TAG_TO_SCOPES = new Map<string, string[]>([
211213 [ "macro" , [ "entity.name.macro" ] ] ,
212214
213215 [ "variable" , [ "variable" ] ] ,
214- [ "variable.mut " , [ "variable" , "meta.mutable" ] ] ,
216+ [ "variable.mutable " , [ "variable" , "meta.mutable" ] ] ,
215217
216218 [ "type" , [ "entity.name.type" ] ] ,
217219 [ "type.builtin" , [ "entity.name.type" , "support.type.primitive" ] ] ,
@@ -221,10 +223,10 @@ const TAG_TO_SCOPES = new Map<string, string[]>([
221223
222224 [ "literal.byte" , [ "constant.character.byte" ] ] ,
223225 [ "literal.char" , [ "constant.character.rust" ] ] ,
224- [ "literal.numeric " , [ "constant.numeric" ] ] ,
226+ [ "numeric_literal " , [ "constant.numeric" ] ] ,
225227
226228 [ "comment" , [ "comment" ] ] ,
227- [ "string " , [ "string.quoted" ] ] ,
229+ [ "string_literal " , [ "string.quoted" ] ] ,
228230 [ "attribute" , [ "meta.attribute.rust" ] ] ,
229231
230232 [ "keyword" , [ "keyword" ] ] ,
0 commit comments