diff --git a/src/message_handler.cc b/src/message_handler.cc index 498a72deb..50dedf73c 100644 --- a/src/message_handler.cc +++ b/src/message_handler.cc @@ -356,6 +356,13 @@ void emitSemanticHighlight(DB *db, WorkingFile *wfile, QueryFile &file) { break; } } + // this should always be true: + if (parent_kind == SymbolKind::Unknown) { + VarDef const *any_def = var.anyDef(); + if (any_def) { + parent_kind = any_def->parent_kind; + } + } break; } default: