mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 07:35:08 +00:00
Move most of the information in document outline to containerName. This makes searching nicer.
This commit is contained in:
parent
f907d1d1b9
commit
671a54c7af
@ -560,7 +560,9 @@ optional<lsSymbolInformation> GetSymbolInfo(QueryDatabase* db, WorkingFiles* wor
|
||||
return nullopt;
|
||||
|
||||
lsSymbolInformation info;
|
||||
info.name = type->def.detailed_name;
|
||||
info.name = type->def.short_name;
|
||||
if (type->def.detailed_name != type->def.short_name)
|
||||
info.containerName = type->def.detailed_name;
|
||||
info.kind = lsSymbolKind::Class;
|
||||
return info;
|
||||
}
|
||||
@ -570,15 +572,14 @@ optional<lsSymbolInformation> GetSymbolInfo(QueryDatabase* db, WorkingFiles* wor
|
||||
return nullopt;
|
||||
|
||||
lsSymbolInformation info;
|
||||
info.name = func->def.detailed_name;
|
||||
info.name = func->def.short_name;
|
||||
info.containerName = func->def.detailed_name;
|
||||
info.kind = lsSymbolKind::Function;
|
||||
|
||||
if (func->def.declaring_type.has_value()) {
|
||||
optional<QueryType>& container = db->types[func->def.declaring_type->id];
|
||||
if (container) {
|
||||
if (container)
|
||||
info.kind = lsSymbolKind::Method;
|
||||
info.containerName = container->def.detailed_name;
|
||||
}
|
||||
}
|
||||
|
||||
return info;
|
||||
@ -589,7 +590,8 @@ optional<lsSymbolInformation> GetSymbolInfo(QueryDatabase* db, WorkingFiles* wor
|
||||
return nullopt;
|
||||
|
||||
lsSymbolInformation info;
|
||||
info.name += var->def.detailed_name;
|
||||
info.name += var->def.short_name;
|
||||
info.containerName = var->def.detailed_name;
|
||||
info.kind = lsSymbolKind::Variable;
|
||||
return info;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user