about summary refs log tree commit diff
path: root/editors/code
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-12-03 22:53:32 +0000
committerGitHub <noreply@github.com>2021-12-03 22:53:32 +0000
commit348110dcd9331d9a8aafbe72d016c214225e4f0f (patch)
treefe7e09610a284dc18cf30c24587360cb454e4491 /editors/code
parentbf7622614895ec6cbed7ea5a6b6b2616680fe50f (diff)
parentd74894abe2a598eb90e10d21f7bc304a3c816ed9 (diff)
downloadrust-348110dcd9331d9a8aafbe72d016c214225e4f0f.tar.gz
rust-348110dcd9331d9a8aafbe72d016c214225e4f0f.zip
Merge #10919
10919: internal: Define missing semantic token hierarchies in package.json r=Veykril a=Veykril

Closes https://github.com/rust-analyzer/rust-analyzer/issues/10077
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/package.json172
1 files changed, 117 insertions, 55 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 34340d14942..5cad1752ccc 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -1113,89 +1113,136 @@
         ],
         "semanticTokenTypes": [
             {
+                "id": "angle",
+                "description": "Style for < or >",
+                "superType": "punctuation"
+            },
+            {
+                "id": "arithmetic",
+                "description": "Style for arithmetic operators",
+                "superType": "operator"
+            },
+            {
                 "id": "attribute",
                 "description": "Style for attributes"
             },
             {
+                "id": "bitwise",
+                "description": "Style for bitwise operators",
+                "superType": "operator"
+            },
+            {
                 "id": "boolean",
                 "description": "Style for boolean literals",
                 "superType": "keyword"
             },
             {
+                "id": "brace",
+                "description": "Style for { or }",
+                "superType": "punctuation"
+            },
+            {
+                "id": "bracket",
+                "description": "Style for [ or ]",
+                "superType": "punctuation"
+            },
+            {
+                "id": "builtinAttribute",
+                "description": "Style for builtin attributes",
+                "superType": "attribute"
+            },
+            {
                 "id": "builtinType",
                 "description": "Style for builtin types",
                 "superType": "type"
             },
             {
-                "id": "lifetime",
-                "description": "Style for lifetimes"
+                "id": "char",
+                "description": "Style for character literals",
+                "superType": "type"
             },
             {
-                "id": "selfKeyword",
-                "description": "Style for the self keyword",
-                "superType": "keyword"
+                "id": "colon",
+                "description": "Style for :",
+                "superType": "punctuation"
             },
             {
-                "id": "typeAlias",
-                "description": "Style for type aliases",
-                "superType": "type"
+                "id": "comma",
+                "description": "Style for ,",
+                "superType": "punctuation"
             },
             {
-                "id": "union",
-                "description": "Style for C-style untagged unions",
-                "superType": "type"
+                "id": "comparison",
+                "description": "Style for comparison operators",
+                "superType": "operator"
             },
             {
-                "id": "unresolvedReference",
-                "description": "Style for names which can not be resolved due to compilation errors"
+                "id": "constParameter",
+                "description": "Style for const generics"
+            },
+            {
+                "id": "dot",
+                "description": "Style for .",
+                "superType": "punctuation"
+            },
+            {
+                "id": "escapeSequence",
+                "description": "Style for char escapes in strings"
             },
             {
                 "id": "formatSpecifier",
                 "description": "Style for {} placeholders in format strings"
             },
             {
-                "id": "punctuation",
-                "description": "generic punctuation"
+                "id": "label",
+                "description": "Style for labels"
             },
             {
-                "id": "parenthesis",
-                "description": "( or )",
-                "superType": "punctuation"
+                "id": "lifetime",
+                "description": "Style for lifetimes"
             },
             {
-                "id": "bracket",
-                "description": "[ or ]",
-                "superType": "punctuation"
+                "id": "logical",
+                "description": "Style for logic operators",
+                "superType": "operator"
             },
             {
-                "id": "brace",
-                "description": "{ or }",
+                "id": "operator",
+                "description": "Style for operators",
                 "superType": "punctuation"
             },
             {
-                "id": "angle",
-                "description": "< or >",
+                "id": "parenthesis",
+                "description": "Style for ( or )",
                 "superType": "punctuation"
             },
             {
-                "id": "comma",
-                "description": ",",
-                "superType": "punctuation"
+                "id": "punctuation",
+                "description": "Style for generic punctuation"
             },
             {
-                "id": "colon",
-                "description": ":",
-                "superType": "punctuation"
+                "id": "selfKeyword",
+                "description": "Style for the self keyword",
+                "superType": "keyword"
             },
             {
                 "id": "semicolon",
-                "description": ";",
+                "description": "Style for ;",
                 "superType": "punctuation"
             },
             {
-                "id": "dot",
-                "description": ".",
-                "superType": "punctuation"
+                "id": "typeAlias",
+                "description": "Style for type aliases",
+                "superType": "type"
+            },
+            {
+                "id": "union",
+                "description": "Style for C-style untagged unions",
+                "superType": "type"
+            },
+            {
+                "id": "unresolvedReference",
+                "description": "Style for names which can not be resolved due to compilation errors"
             }
         ],
         "semanticTokenModifiers": [
@@ -1208,14 +1255,14 @@
                 "description": "Style for elements within attributes"
             },
             {
-                "id": "constant",
-                "description": "Style for compile-time constants"
-            },
-            {
                 "id": "callable",
                 "description": "Style for locals whose types implements one of the `Fn*` traits"
             },
             {
+                "id": "constant",
+                "description": "Style for compile-time constants"
+            },
+            {
                 "id": "consuming",
                 "description": "Style for locals that are being consumed when use in a function call"
             },
@@ -1224,8 +1271,8 @@
                 "description": "Style for control-flow related tokens, this includes the `?` operator"
             },
             {
-                "id": "definition",
-                "description": "Style for mutable bindings"
+                "id": "crateRoot",
+                "description": "Style for names resolving to a crate root"
             },
             {
                 "id": "injected",
@@ -1267,26 +1314,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"
@@ -1294,12 +1341,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"
                     ]