restore coloring of attributes

This commit is contained in:
Aleksey Kladov 2019-10-08 14:52:03 +03:00
parent 857f419c9d
commit 6503add6e3
2 changed files with 4 additions and 1 deletions

View file

@ -97,6 +97,9 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa
STRING | RAW_STRING | RAW_BYTE_STRING | BYTE_STRING => "string",
ATTR => "attribute",
NAME_REF => {
if node.ancestors().any(|it| it.kind() == ATTR) {
continue;
}
if let Some(name_ref) = node.as_node().cloned().and_then(ast::NameRef::cast) {
// FIXME: try to reuse the SourceAnalyzers
let analyzer = hir::SourceAnalyzer::new(db, file_id, name_ref.syntax(), None);