diff options
author | Aleksey Kladov <[email protected]> | 2020-02-28 15:49:46 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-02-28 15:53:12 +0000 |
commit | 56ce34c6a7ec0b4426d4cb25e10512c7efaf6f06 (patch) | |
tree | eec2d0d619cba2989313e66a87207b1641264a74 /crates/ra_ide/src/syntax_highlighting.rs | |
parent | 5ebfcb9cb757ece936f631cf69136e1d38cb6afc (diff) |
Correctly flag 'lifetime definitions as definitions
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index 6312bcb83..b94b6a022 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs | |||
@@ -214,8 +214,13 @@ fn highlight_element( | |||
214 | INT_NUMBER | FLOAT_NUMBER => HighlightTag::NumericLiteral.into(), | 214 | INT_NUMBER | FLOAT_NUMBER => HighlightTag::NumericLiteral.into(), |
215 | BYTE => HighlightTag::ByteLiteral.into(), | 215 | BYTE => HighlightTag::ByteLiteral.into(), |
216 | CHAR => HighlightTag::CharLiteral.into(), | 216 | CHAR => HighlightTag::CharLiteral.into(), |
217 | // FIXME: set Declaration for decls | 217 | LIFETIME => { |
218 | LIFETIME => HighlightTag::Lifetime.into(), | 218 | let h = Highlight::new(HighlightTag::Lifetime); |
219 | dbg!(match element.parent().map(|it| it.kind()) { | ||
220 | Some(LIFETIME_PARAM) | Some(LABEL) => h | HighlightModifier::Definition, | ||
221 | _ => h, | ||
222 | }) | ||
223 | } | ||
219 | 224 | ||
220 | k if k.is_keyword() => { | 225 | k if k.is_keyword() => { |
221 | let h = Highlight::new(HighlightTag::Keyword); | 226 | let h = Highlight::new(HighlightTag::Keyword); |