From d5d154ba3f6823feeaaa62c2238711bcf0c43c53 Mon Sep 17 00:00:00 2001 From: George Fraser Date: Sat, 9 May 2020 12:32:08 -0700 Subject: [PATCH] Color lifetimes like types --- editors/code/rust.tmGrammar.json | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json index 784bd8c9aca..16497abb0a9 100644 --- a/editors/code/rust.tmGrammar.json +++ b/editors/code/rust.tmGrammar.json @@ -586,23 +586,15 @@ }, "lifetime": { "comment": "Named lifetime", - "name": "storage.modifier.lifetime.rust", - "match": "'([a-zA-Z_][a-zA-Z0-9_]*)\\b", - "captures": { - "1": { - "name": "entity.name.lifetime.rust" - } - } + "name": "entity.name.type.lifetime.rust", + "match": "'([a-zA-Z_][a-zA-Z0-9_]*)\\b" }, "ref_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": { "1": { - "name": "storage.modifier.lifetime.rust" - }, - "2": { - "name": "entity.name.lifetime.rust" + "name": "entity.name.type.lifetime.rust" } } },