Skip to content

Commit 945900b

Browse files
bors[bot]cynecx
andauthored
Merge #6497
6497: vscode: fix tmGrammar issues around non-controlflow keywords r=dustypomerleau a=cynecx Addresses some of the issues mentioned here: dustypomerleau/rust-syntax#5. In sync with dustypomerleau/rust-syntax#6. Co-authored-by: cynecx <me@cynecx.net>
2 parents dac7060 + fbd3d73 commit 945900b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

editors/code/rust.tmGrammar.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
"match": "(mod)\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)",
168168
"captures": {
169169
"1": {
170-
"name": "keyword.control.rust"
170+
"name": "storage.type.rust"
171171
},
172172
"2": {
173173
"name": "entity.name.module.rust"
@@ -180,7 +180,7 @@
180180
"begin": "\\b(extern)\\s+(crate)",
181181
"beginCaptures": {
182182
"1": {
183-
"name": "keyword.control.rust"
183+
"name": "storage.type.rust"
184184
},
185185
"2": {
186186
"name": "keyword.other.crate.rust"
@@ -213,7 +213,7 @@
213213
"begin": "\\b(use)\\s",
214214
"beginCaptures": {
215215
"1": {
216-
"name": "keyword.control.rust"
216+
"name": "keyword.other.rust"
217217
}
218218
},
219219
"end": ";",
@@ -342,7 +342,7 @@
342342
"match": "\\b(const)\\s+([A-Z][A-Za-z0-9_]*)\\b",
343343
"captures": {
344344
"1": {
345-
"name": "keyword.control.rust"
345+
"name": "storage.type.rust"
346346
},
347347
"2": {
348348
"name": "constant.other.caps.rust"
@@ -450,7 +450,7 @@
450450
"begin": "\\b(fn)\\s+((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)((\\()|(<))",
451451
"beginCaptures": {
452452
"1": {
453-
"name": "keyword.control.fn.rust"
453+
"name": "keyword.other.fn.rust"
454454
},
455455
"2": {
456456
"name": "entity.name.function.rust"
@@ -643,7 +643,7 @@
643643
{
644644
"comment": "control flow keywords",
645645
"name": "keyword.control.rust",
646-
"match": "\\b(async|await|break|continue|do|else|for|if|loop|match|move|return|try|where|while|yield)\\b"
646+
"match": "\\b(await|break|continue|do|else|for|if|loop|match|return|try|while|yield)\\b"
647647
},
648648
{
649649
"comment": "storage keywords",
@@ -658,7 +658,7 @@
658658
{
659659
"comment": "other keywords",
660660
"name": "keyword.other.rust",
661-
"match": "\\b(as|become|box|dyn|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual)\\b"
661+
"match": "\\b(as|async|become|box|dyn|move|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\\b"
662662
},
663663
{
664664
"comment": "fn",

0 commit comments

Comments
 (0)