From d74894abe2a598eb90e10d21f7bc304a3c816ed9 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 3 Dec 2021 22:16:57 +0100 Subject: [PATCH] Add some more semantic token to textmate grammar mapping --- editors/code/package.json | 43 ++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/editors/code/package.json b/editors/code/package.json index 85fbbdea8f..6cefd4f22c 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -1318,26 +1318,26 @@ "attribute": [ "meta.attribute.rust" ], - "function.attribute": [ - "entity.name.function.attribute.rust" - ], "boolean": [ "constant.language.boolean.rust" ], "builtinType": [ "support.type.primitive.rust" ], - "lifetime": [ - "storage.modifier.lifetime.rust" + "constParameter": [ + "constant.other.caps.rust" ], - "typeAlias": [ - "entity.name.type.typeAlias.rust" + "enum": [ + "entity.name.type.enum.rust" ], - "union": [ - "entity.name.type.union.rust" + "formatSpecifier": [ + "punctuation.section.embedded.rust" ], - "struct": [ - "entity.name.type.struct.rust" + "function": [ + "entity.name.function.rust" + ], + "interface": [ + "entity.name.type.trait.rust" ], "keyword": [ "keyword.other.rust" @@ -1345,12 +1345,27 @@ "keyword.controlFlow": [ "keyword.control.rust" ], + "lifetime": [ + "storage.modifier.lifetime.rust" + ], + "method": [ + "entity.name.function.rust" + ], + "struct": [ + "entity.name.type.struct.rust" + ], + "typeAlias": [ + "entity.name.type.declaration.rust" + ], + "union": [ + "entity.name.type.union.rust" + ], + "variable": [ + "variable.other.rust" + ], "variable.constant": [ "variable.other.constant.rust" ], - "formatSpecifier": [ - "punctuation.section.embedded.rust" - ], "*.mutable": [ "markup.underline" ]