mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-26 13:51:55 +00:00
Change lifetimes back to keyword-ish, tweak builtins for consistency between TextMate and semantic
This commit is contained in:
parent
63b75a40c8
commit
2d2b32abe5
2 changed files with 10 additions and 7 deletions
|
|
@ -601,7 +601,7 @@
|
||||||
"support.type.primitive"
|
"support.type.primitive"
|
||||||
],
|
],
|
||||||
"lifetime": [
|
"lifetime": [
|
||||||
"entity.name.type.lifetime"
|
"storage.modifier.lifetime.rust"
|
||||||
],
|
],
|
||||||
"typeAlias": [
|
"typeAlias": [
|
||||||
"entity.name.type.typeAlias"
|
"entity.name.type.typeAlias"
|
||||||
|
|
|
||||||
|
|
@ -580,22 +580,25 @@
|
||||||
},
|
},
|
||||||
"lifetime": {
|
"lifetime": {
|
||||||
"comment": "Named lifetime",
|
"comment": "Named lifetime",
|
||||||
"name": "entity.name.type.lifetime.rust",
|
"name": "storage.modifier.lifetime.rust",
|
||||||
"match": "'([a-zA-Z_][a-zA-Z0-9_]*)\\b"
|
"match": "'([a-zA-Z_][a-zA-Z0-9_]*)\\b"
|
||||||
},
|
},
|
||||||
"ref_lifetime": {
|
"ref_lifetime": {
|
||||||
"comment": "Reference with named lifetime",
|
"comment": "Reference with named lifetime",
|
||||||
"match": "&('[a-zA-Z_][a-zA-Z0-9_]*)\\b",
|
"match": "(&)('[a-zA-Z_][a-zA-Z0-9_]*)\\b",
|
||||||
"captures": {
|
"captures": {
|
||||||
"1": {
|
"1": {
|
||||||
"name": "entity.name.type.lifetime.rust"
|
"name": "keyword.other.sigil.rust"
|
||||||
|
},
|
||||||
|
"2": {
|
||||||
|
"name": "storage.modifier.lifetime.rust"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"core_types": {
|
"core_types": {
|
||||||
"comment": "Built-in/core type",
|
"comment": "Built-in/core type",
|
||||||
"name": "entity.name.type.core.rust",
|
"name": "support.type.primitive",
|
||||||
"match": "\\b(bool|char|usize|isize|u8|u16|u32|u64|u128|i8|i16|i32|i64|i128|f32|f64|str|Self|Option|Result)\\b"
|
"match": "\\b(bool|char|usize|isize|u8|u16|u32|u64|u128|i8|i16|i32|i64|i128|f32|f64|str|Self)\\b"
|
||||||
},
|
},
|
||||||
"core_vars": {
|
"core_vars": {
|
||||||
"comment": "Core type variant",
|
"comment": "Core type variant",
|
||||||
|
|
@ -615,7 +618,7 @@
|
||||||
"std_types": {
|
"std_types": {
|
||||||
"comment": "Standard library type",
|
"comment": "Standard library type",
|
||||||
"name": "entity.name.type.class.std.rust",
|
"name": "entity.name.type.class.std.rust",
|
||||||
"match": "\\b(Box|String|Vec|Path|PathBuf)\\b"
|
"match": "\\b(Box|String|Vec|Path|PathBuf|Option|Result)\\b"
|
||||||
},
|
},
|
||||||
"std_traits": {
|
"std_traits": {
|
||||||
"comment": "Standard library trait",
|
"comment": "Standard library trait",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue