]> git.lizzy.rs Git - rust.git/commitdiff
vscode: fix tmGrammar issues around non-controlflow keywords
authorcynecx <me@cynecx.net>
Sat, 7 Nov 2020 19:12:56 +0000 (20:12 +0100)
committercynecx <me@cynecx.net>
Sat, 7 Nov 2020 19:12:56 +0000 (20:12 +0100)
editors/code/rust.tmGrammar.json

index 608a3354ee9ca49d8ef1d0cb4cf6f19345e7aa68..b3a10795eb004f15de5eb2582d426f1272c2b1ee 100644 (file)
             "match": "(mod)\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)",
             "captures": {
                 "1": {
-                    "name": "keyword.control.rust"
+                    "name": "storage.type.rust"
                 },
                 "2": {
                     "name": "entity.name.module.rust"
             "begin": "\\b(extern)\\s+(crate)",
             "beginCaptures": {
                 "1": {
-                    "name": "keyword.control.rust"
+                    "name": "storage.type.rust"
                 },
                 "2": {
                     "name": "keyword.other.crate.rust"
             "begin": "\\b(use)\\s",
             "beginCaptures": {
                 "1": {
-                    "name": "keyword.control.rust"
+                    "name": "keyword.other.rust"
                 }
             },
             "end": ";",
                     "match": "\\b(const)\\s+([A-Z][A-Za-z0-9_]*)\\b",
                     "captures": {
                         "1": {
-                            "name": "keyword.control.rust"
+                            "name": "storage.type.rust"
                         },
                         "2": {
                             "name": "constant.other.caps.rust"
                     "begin": "\\b(fn)\\s+((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)((\\()|(<))",
                     "beginCaptures": {
                         "1": {
-                            "name": "keyword.control.fn.rust"
+                            "name": "keyword.other.fn.rust"
                         },
                         "2": {
                             "name": "entity.name.function.rust"
                 {
                     "comment": "control flow keywords",
                     "name": "keyword.control.rust",
-                    "match": "\\b(async|await|break|continue|do|else|for|if|loop|match|move|return|try|where|while|yield)\\b"
+                    "match": "\\b(await|break|continue|do|else|for|if|loop|match|return|try|while|yield)\\b"
                 },
                 {
                     "comment": "storage keywords",
                 {
                     "comment": "other keywords",
                     "name": "keyword.other.rust",
-                    "match": "\\b(as|become|box|dyn|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual)\\b"
+                    "match": "\\b(as|async|become|box|dyn|move|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\\b"
                 },
                 {
                     "comment": "fn",