diff options
author | George Fraser <[email protected]> | 2020-05-10 21:32:42 +0100 |
---|---|---|
committer | George Fraser <[email protected]> | 2020-05-10 21:32:42 +0100 |
commit | 2d2b32abe5edc6102a8800dedcc40bb3ac8bc393 (patch) | |
tree | 62466376a86f0a722bff9c27a4727d7c76982eb3 /editors/code | |
parent | 63b75a40c8c9e1f24fbd21c423f62f303281b77c (diff) |
Change lifetimes back to keyword-ish, tweak builtins for consistency between TextMate and semantic
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package.json | 2 | ||||
-rw-r--r-- | editors/code/rust.tmGrammar.json | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 40ae3ab9e..f46684c76 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -601,7 +601,7 @@ | |||
601 | "support.type.primitive" | 601 | "support.type.primitive" |
602 | ], | 602 | ], |
603 | "lifetime": [ | 603 | "lifetime": [ |
604 | "entity.name.type.lifetime" | 604 | "storage.modifier.lifetime.rust" |
605 | ], | 605 | ], |
606 | "typeAlias": [ | 606 | "typeAlias": [ |
607 | "entity.name.type.typeAlias" | 607 | "entity.name.type.typeAlias" |
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json index 6fe16d794..c5ac9a99e 100644 --- a/editors/code/rust.tmGrammar.json +++ b/editors/code/rust.tmGrammar.json | |||
@@ -580,22 +580,25 @@ | |||
580 | }, | 580 | }, |
581 | "lifetime": { | 581 | "lifetime": { |
582 | "comment": "Named lifetime", | 582 | "comment": "Named lifetime", |
583 | "name": "entity.name.type.lifetime.rust", | 583 | "name": "storage.modifier.lifetime.rust", |
584 | "match": "'([a-zA-Z_][a-zA-Z0-9_]*)\\b" | 584 | "match": "'([a-zA-Z_][a-zA-Z0-9_]*)\\b" |
585 | }, | 585 | }, |
586 | "ref_lifetime": { | 586 | "ref_lifetime": { |
587 | "comment": "Reference with named lifetime", | 587 | "comment": "Reference with named lifetime", |
588 | "match": "&('[a-zA-Z_][a-zA-Z0-9_]*)\\b", | 588 | "match": "(&)('[a-zA-Z_][a-zA-Z0-9_]*)\\b", |
589 | "captures": { | 589 | "captures": { |
590 | "1": { | 590 | "1": { |
591 | "name": "entity.name.type.lifetime.rust" | 591 | "name": "keyword.other.sigil.rust" |
592 | }, | ||
593 | "2": { | ||
594 | "name": "storage.modifier.lifetime.rust" | ||
592 | } | 595 | } |
593 | } | 596 | } |
594 | }, | 597 | }, |
595 | "core_types": { | 598 | "core_types": { |
596 | "comment": "Built-in/core type", | 599 | "comment": "Built-in/core type", |
597 | "name": "entity.name.type.core.rust", | 600 | "name": "support.type.primitive", |
598 | "match": "\\b(bool|char|usize|isize|u8|u16|u32|u64|u128|i8|i16|i32|i64|i128|f32|f64|str|Self|Option|Result)\\b" | 601 | "match": "\\b(bool|char|usize|isize|u8|u16|u32|u64|u128|i8|i16|i32|i64|i128|f32|f64|str|Self)\\b" |
599 | }, | 602 | }, |
600 | "core_vars": { | 603 | "core_vars": { |
601 | "comment": "Core type variant", | 604 | "comment": "Core type variant", |
@@ -615,7 +618,7 @@ | |||
615 | "std_types": { | 618 | "std_types": { |
616 | "comment": "Standard library type", | 619 | "comment": "Standard library type", |
617 | "name": "entity.name.type.class.std.rust", | 620 | "name": "entity.name.type.class.std.rust", |
618 | "match": "\\b(Box|String|Vec|Path|PathBuf)\\b" | 621 | "match": "\\b(Box|String|Vec|Path|PathBuf|Option|Result)\\b" |
619 | }, | 622 | }, |
620 | "std_traits": { | 623 | "std_traits": { |
621 | "comment": "Standard library trait", | 624 | "comment": "Standard library trait", |