diff options
author | Aleksey Kladov <[email protected]> | 2019-10-08 12:52:03 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-10-08 12:52:03 +0100 |
commit | 6503add6e3c900ea7ded37199ea58f43bb57b051 (patch) | |
tree | 3375f0f1edd289526c2d616484c0db0538542f7a /crates/ra_ide_api/src/syntax_highlighting.rs | |
parent | 857f419c9ded5ebeab428535729b57687499d3a6 (diff) |
restore coloring of attributes
Diffstat (limited to 'crates/ra_ide_api/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ra_ide_api/src/syntax_highlighting.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/syntax_highlighting.rs b/crates/ra_ide_api/src/syntax_highlighting.rs index 9ae2dc061..1d290387c 100644 --- a/crates/ra_ide_api/src/syntax_highlighting.rs +++ b/crates/ra_ide_api/src/syntax_highlighting.rs | |||
@@ -97,6 +97,9 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa | |||
97 | STRING | RAW_STRING | RAW_BYTE_STRING | BYTE_STRING => "string", | 97 | STRING | RAW_STRING | RAW_BYTE_STRING | BYTE_STRING => "string", |
98 | ATTR => "attribute", | 98 | ATTR => "attribute", |
99 | NAME_REF => { | 99 | NAME_REF => { |
100 | if node.ancestors().any(|it| it.kind() == ATTR) { | ||
101 | continue; | ||
102 | } | ||
100 | if let Some(name_ref) = node.as_node().cloned().and_then(ast::NameRef::cast) { | 103 | if let Some(name_ref) = node.as_node().cloned().and_then(ast::NameRef::cast) { |
101 | // FIXME: try to reuse the SourceAnalyzers | 104 | // FIXME: try to reuse the SourceAnalyzers |
102 | let analyzer = hir::SourceAnalyzer::new(db, file_id, name_ref.syntax(), None); | 105 | let analyzer = hir::SourceAnalyzer::new(db, file_id, name_ref.syntax(), None); |