From d14f17212dda35d5885f28c76706e67dea6fdf69 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Thu, 25 Jan 2018 11:22:25 -0800 Subject: [PATCH] Do not show code lens on namespaces. There are too many references for editors to handle well. --- src/messages/text_document_code_lens.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/messages/text_document_code_lens.cc b/src/messages/text_document_code_lens.cc index 08c6af4f..c8f9617e 100644 --- a/src/messages/text_document_code_lens.cc +++ b/src/messages/text_document_code_lens.cc @@ -152,6 +152,8 @@ struct TextDocumentCodeLensHandler QueryType& type = db->types[symbol.idx]; if (!type.def) continue; + if (type.def->kind == ClangSymbolKind::Namespace) + continue; AddCodeLens("ref", "refs", &common, ref.loc.OffsetStartColumn(0), type.uses, type.def->definition_spelling, true /*force_display*/);