forked from OSchip/llvm-project
[clangd][NFC] Fix formatting in ClangdLSPServer
This commit is contained in:
parent
01dc85c173
commit
9407686687
|
@ -1049,22 +1049,21 @@ void ClangdLSPServer::onCompletion(const CompletionParams &Params,
|
|||
vlog("ignored auto-triggered completion, preceding char did not match");
|
||||
return Reply(CompletionList());
|
||||
}
|
||||
Server->codeComplete(Params.textDocument.uri.file(), Params.position,
|
||||
Opts.CodeComplete,
|
||||
[Reply = std::move(Reply),
|
||||
this](llvm::Expected<CodeCompleteResult> List) mutable {
|
||||
if (!List)
|
||||
return Reply(List.takeError());
|
||||
CompletionList LSPList;
|
||||
LSPList.isIncomplete = List->HasMore;
|
||||
for (const auto &R : List->Completions) {
|
||||
CompletionItem C = R.render(Opts.CodeComplete);
|
||||
C.kind = adjustKindToCapability(
|
||||
C.kind, SupportedCompletionItemKinds);
|
||||
LSPList.items.push_back(std::move(C));
|
||||
}
|
||||
return Reply(std::move(LSPList));
|
||||
});
|
||||
Server->codeComplete(
|
||||
Params.textDocument.uri.file(), Params.position, Opts.CodeComplete,
|
||||
[Reply = std::move(Reply),
|
||||
this](llvm::Expected<CodeCompleteResult> List) mutable {
|
||||
if (!List)
|
||||
return Reply(List.takeError());
|
||||
CompletionList LSPList;
|
||||
LSPList.isIncomplete = List->HasMore;
|
||||
for (const auto &R : List->Completions) {
|
||||
CompletionItem C = R.render(Opts.CodeComplete);
|
||||
C.kind = adjustKindToCapability(C.kind, SupportedCompletionItemKinds);
|
||||
LSPList.items.push_back(std::move(C));
|
||||
}
|
||||
return Reply(std::move(LSPList));
|
||||
});
|
||||
}
|
||||
|
||||
void ClangdLSPServer::onSignatureHelp(const TextDocumentPositionParams &Params,
|
||||
|
|
Loading…
Reference in New Issue