Do not show code lens on namespaces.

There are too many references for editors to handle well.
This commit is contained in:
Jacob Dufault 2018-01-25 11:22:25 -08:00
parent 684ad961ad
commit d14f17212d

View File

@ -152,6 +152,8 @@ struct TextDocumentCodeLensHandler
QueryType& type = db->types[symbol.idx]; QueryType& type = db->types[symbol.idx];
if (!type.def) if (!type.def)
continue; continue;
if (type.def->kind == ClangSymbolKind::Namespace)
continue;
AddCodeLens("ref", "refs", &common, ref.loc.OffsetStartColumn(0), AddCodeLens("ref", "refs", &common, ref.loc.OffsetStartColumn(0),
type.uses, type.def->definition_spelling, type.uses, type.def->definition_spelling,
true /*force_display*/); true /*force_display*/);