From 701cf436063590c710cd7783032b5e7c3c41af22 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 28 Feb 2020 12:06:54 +0100 Subject: Cleanup highlighting tags --- editors/code/package.json | 87 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 70 insertions(+), 17 deletions(-) (limited to 'editors') diff --git a/editors/code/package.json b/editors/code/package.json index fd29710ba..df8265be1 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -383,21 +383,42 @@ ], "semanticTokenTypes": [ { - "id": "attribute" + "id": "attribute", + "description": "Style for attributes" }, { - "id": "constant" + "id": "builtinType", + "description": "Style for builtin types" + }, + { + "id": "lifetime", + "description": "Style for lifetimes" + }, + { + "id": "typeAlias", + "description": "Style for type aliases" + }, + { + "id": "union", + "description": "Style for C-style untagged unions" } ], "semanticTokenModifiers": [ { - "id": "mutable" + "id": "constant", + "description": "Style for compile-time constants" }, { - "id": "unsafe" + "id": "control", + "description": "Style for control flow keywords" }, { - "id": "control" + "id": "mutable", + "description": "Style for mutable bindings" + }, + { + "id": "unsafe", + "description": "Style for unsafe operations" } ], "semanticTokenStyleDefaults": [ @@ -408,21 +429,29 @@ ] }, { - "selector": "*.mutable", - "light": { - "fontStyle": "underline" - }, - "dark": { - "fontStyle": "underline" - }, - "highContrast": { - "fontStyle": "underline" - } + "selector": "builtinType", + "scope": [ + "support.type.primitive" + ] }, { - "selector": "constant", + "selector": "lifetime", "scope": [ - "entity.name.constant" + "entity.name.lifetime.rust" + ] + }, + { + "selector": "typeAlias", + "scope": [ + "entity.name.type", + "entity.name.typeAlias" + ] + }, + { + "selector": "union", + "scope": [ + "entity.name.type", + "entity.name.union" ] }, { @@ -430,6 +459,30 @@ "scope": [ "keyword.other.unsafe" ] + }, + { + "selector": "keyword.control", + "scope": [ + "keyword.control" + ] + }, + { + "selector": "variable.constant", + "scope": [ + "entity.name.constant" + ] + }, + { + "selector": "*.mutable", + "light": { + "fontStyle": "underline" + }, + "dark": { + "fontStyle": "underline" + }, + "highContrast": { + "fontStyle": "underline" + } } ] } -- cgit v1.2.3