mirror of
https://github.com/MaskRay/ccls.git
synced 2025-03-30 13:32:13 +00:00
Small nits
This commit is contained in:
parent
faa3cce185
commit
2ebaadd696
@ -98,7 +98,7 @@ std::string BuildLabelString(CXCompletionString completion_string) {
|
|||||||
std::string label;
|
std::string label;
|
||||||
|
|
||||||
int num_chunks = clang_getNumCompletionChunks(completion_string);
|
int num_chunks = clang_getNumCompletionChunks(completion_string);
|
||||||
for (unsigned i = 0; i < num_chunks; ++i) {
|
for (int i = 0; i < num_chunks; ++i) {
|
||||||
CXCompletionChunkKind kind = clang_getCompletionChunkKind(completion_string, i);
|
CXCompletionChunkKind kind = clang_getCompletionChunkKind(completion_string, i);
|
||||||
if (kind == CXCompletionChunk_TypedText) {
|
if (kind == CXCompletionChunk_TypedText) {
|
||||||
label += clang::ToString(clang_getCompletionChunkText(completion_string, i));
|
label += clang::ToString(clang_getCompletionChunkText(completion_string, i));
|
||||||
@ -113,7 +113,7 @@ std::string BuildDetailString(CXCompletionString completion_string) {
|
|||||||
std::string detail;
|
std::string detail;
|
||||||
|
|
||||||
int num_chunks = clang_getNumCompletionChunks(completion_string);
|
int num_chunks = clang_getNumCompletionChunks(completion_string);
|
||||||
for (unsigned i = 0; i < num_chunks; ++i) {
|
for (int i = 0; i < num_chunks; ++i) {
|
||||||
CXCompletionChunkKind kind = clang_getCompletionChunkKind(completion_string, i);
|
CXCompletionChunkKind kind = clang_getCompletionChunkKind(completion_string, i);
|
||||||
|
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
@ -272,7 +272,7 @@ NonElidedVector<lsCompletionItem> CompletionManager::CodeComplete(const lsTextDo
|
|||||||
ls_result.reserve(cx_results->NumResults);
|
ls_result.reserve(cx_results->NumResults);
|
||||||
|
|
||||||
timer.Reset();
|
timer.Reset();
|
||||||
for (int i = 0; i < cx_results->NumResults; ++i) {
|
for (unsigned i = 0; i < cx_results->NumResults; ++i) {
|
||||||
CXCompletionResult& result = cx_results->Results[i];
|
CXCompletionResult& result = cx_results->Results[i];
|
||||||
|
|
||||||
//unsigned int is_incomplete;
|
//unsigned int is_incomplete;
|
||||||
|
@ -491,6 +491,7 @@ MAKE_REFLECT_STRUCT(lsTextDocumentEdit, textDocument, edits);
|
|||||||
struct lsWorkspaceEdit {
|
struct lsWorkspaceEdit {
|
||||||
// Holds changes to existing resources.
|
// Holds changes to existing resources.
|
||||||
// changes ? : { [uri:string]: TextEdit[]; };
|
// changes ? : { [uri:string]: TextEdit[]; };
|
||||||
|
//std::unordered_map<lsDocumentUri, std::vector<lsTextEdit>> changes;
|
||||||
|
|
||||||
// An array of `TextDocumentEdit`s to express changes to specific a specific
|
// An array of `TextDocumentEdit`s to express changes to specific a specific
|
||||||
// version of a text document. Whether a client supports versioned document
|
// version of a text document. Whether a client supports versioned document
|
||||||
@ -1112,7 +1113,7 @@ struct Ipc_TextDocumentDidSave : public IpcMessage<Ipc_TextDocumentDidSave> {
|
|||||||
struct Params {
|
struct Params {
|
||||||
// The document that was saved.
|
// The document that was saved.
|
||||||
lsTextDocumentIdentifier textDocument;
|
lsTextDocumentIdentifier textDocument;
|
||||||
|
|
||||||
// Optional the content when saved. Depends on the includeText value
|
// Optional the content when saved. Depends on the includeText value
|
||||||
// when the save notifcation was requested.
|
// when the save notifcation was requested.
|
||||||
// std::string text;
|
// std::string text;
|
||||||
|
Loading…
Reference in New Issue
Block a user