diff options
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index 89efe71da..ec442bcd8 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs | |||
@@ -483,6 +483,7 @@ fn highlight_element( | |||
483 | }; | 483 | }; |
484 | 484 | ||
485 | match name_kind { | 485 | match name_kind { |
486 | Some(NameClass::ExternCrate(_)) => HighlightTag::Module.into(), | ||
486 | Some(NameClass::Definition(def)) => { | 487 | Some(NameClass::Definition(def)) => { |
487 | highlight_name(db, def) | HighlightModifier::Definition | 488 | highlight_name(db, def) | HighlightModifier::Definition |
488 | } | 489 | } |
@@ -500,6 +501,7 @@ fn highlight_element( | |||
500 | let name_ref = element.into_node().and_then(ast::NameRef::cast).unwrap(); | 501 | let name_ref = element.into_node().and_then(ast::NameRef::cast).unwrap(); |
501 | match classify_name_ref(sema, &name_ref) { | 502 | match classify_name_ref(sema, &name_ref) { |
502 | Some(name_kind) => match name_kind { | 503 | Some(name_kind) => match name_kind { |
504 | NameRefClass::ExternCrate(_) => HighlightTag::Module.into(), | ||
503 | NameRefClass::Definition(def) => { | 505 | NameRefClass::Definition(def) => { |
504 | if let Definition::Local(local) = &def { | 506 | if let Definition::Local(local) = &def { |
505 | if let Some(name) = local.name(db) { | 507 | if let Some(name) = local.name(db) { |