mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 15:45:08 +00:00
Do not include path in lambda detail/hover string
This commit is contained in:
parent
36ea900258
commit
fd7c01796c
@ -1027,6 +1027,11 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) {
|
||||
|
||||
std::string type_name =
|
||||
ToString(clang_getTypeSpelling(clang_getCursorType(decl->cursor)));
|
||||
// clang may report "(lambda at foo.cc)" which end up being a very long
|
||||
// string. Shorten it to just "lambda".
|
||||
if (type_name.find("(lambda at") != std::string::npos)
|
||||
type_name = "lambda";
|
||||
|
||||
var->def.detailed_name =
|
||||
type_name + " " +
|
||||
ns->QualifiedName(decl->semanticContainer, var->def.short_name);
|
||||
|
@ -74,8 +74,8 @@ OUTPUT:
|
||||
"id": 1,
|
||||
"usr": "c:lambda.cc@28@F@foo#@dosomething",
|
||||
"short_name": "dosomething",
|
||||
"detailed_name": "(lambda at C:/Users/jacob/Desktop/cquery/tests/lambdas/lambda.cc:4:22) dosomething",
|
||||
"hover": "(lambda at C:/Users/jacob/Desktop/cquery/tests/lambdas/lambda.cc:4:22)",
|
||||
"detailed_name": "lambda dosomething",
|
||||
"hover": "lambda",
|
||||
"definition_spelling": "4:8-4:19",
|
||||
"definition_extent": "4:3-7:4",
|
||||
"variable_type": 0,
|
||||
|
Loading…
Reference in New Issue
Block a user