aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ide/src/syntax_highlighting/highlight.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/ide/src/syntax_highlighting/highlight.rs b/crates/ide/src/syntax_highlighting/highlight.rs
index 574a14429..141536dcc 100644
--- a/crates/ide/src/syntax_highlighting/highlight.rs
+++ b/crates/ide/src/syntax_highlighting/highlight.rs
@@ -303,7 +303,15 @@ fn highlight_def(db: &RootDatabase, krate: Option<hir::Crate>, def: Definition)
303 return h; 303 return h;
304 } 304 }
305 Definition::ModuleDef(def) => match def { 305 Definition::ModuleDef(def) => match def {
306 hir::ModuleDef::Module(_) => HlTag::Symbol(SymbolKind::Module), 306 hir::ModuleDef::Module(module) => {
307 let mut h = Highlight::new(HlTag::Symbol(SymbolKind::Module));
308
309 if Some(module.krate()) != krate {
310 h |= HlMod::Foreign;
311 }
312
313 return h;
314 }
307 hir::ModuleDef::Function(func) => { 315 hir::ModuleDef::Function(func) => {
308 let mut h = Highlight::new(HlTag::Symbol(SymbolKind::Function)); 316 let mut h = Highlight::new(HlTag::Symbol(SymbolKind::Function));
309 if let Some(item) = func.as_assoc_item(db) { 317 if let Some(item) = func.as_assoc_item(db) {