mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 23:55:08 +00:00
Remove enableComments
, make index.comments
default to 2, and index builtin types
This commit is contained in:
parent
43fb1abd8e
commit
b4e1e4fd3a
@ -87,9 +87,6 @@ struct Config {
|
|||||||
// inform users their vscode client is too old and needs to be updated.
|
// inform users their vscode client is too old and needs to be updated.
|
||||||
optional<int> clientVersion;
|
optional<int> clientVersion;
|
||||||
|
|
||||||
// TODO Deprecated in favor of index.comments
|
|
||||||
int enableComments = 0;
|
|
||||||
|
|
||||||
struct ClientCapability {
|
struct ClientCapability {
|
||||||
// TextDocumentClientCapabilities.completion.completionItem.snippetSupport
|
// TextDocumentClientCapabilities.completion.completionItem.snippetSupport
|
||||||
bool snippetSupport = false;
|
bool snippetSupport = false;
|
||||||
@ -107,7 +104,7 @@ struct Config {
|
|||||||
|
|
||||||
// 0: no; 1: Doxygen comment markers; 2: -fparse-all-comments, which includes
|
// 0: no; 1: Doxygen comment markers; 2: -fparse-all-comments, which includes
|
||||||
// plain // /*
|
// plain // /*
|
||||||
int comments = 0;
|
int comments = 2;
|
||||||
};
|
};
|
||||||
Index index;
|
Index index;
|
||||||
|
|
||||||
@ -154,8 +151,6 @@ MAKE_REFLECT_STRUCT(Config,
|
|||||||
|
|
||||||
clientVersion,
|
clientVersion,
|
||||||
|
|
||||||
enableComments,
|
|
||||||
|
|
||||||
client,
|
client,
|
||||||
completion,
|
completion,
|
||||||
index,
|
index,
|
||||||
|
@ -17,9 +17,6 @@
|
|||||||
// TODO: See if we can use clang_indexLoc_getFileLocation to get a type ref on
|
// TODO: See if we can use clang_indexLoc_getFileLocation to get a type ref on
|
||||||
// |Foobar| in DISALLOW_COPY(Foobar)
|
// |Foobar| in DISALLOW_COPY(Foobar)
|
||||||
|
|
||||||
// TODO Global variable
|
|
||||||
bool g_index_builtin_types;
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
constexpr bool kIndexStdDeclarations = true;
|
constexpr bool kIndexStdDeclarations = true;
|
||||||
@ -408,8 +405,7 @@ optional<IndexTypeId> ResolveToDeclarationType(IndexFile* db,
|
|||||||
|
|
||||||
if (CXType_FirstBuiltin <= type.cx_type.kind &&
|
if (CXType_FirstBuiltin <= type.cx_type.kind &&
|
||||||
type.cx_type.kind <= CXType_LastBuiltin) {
|
type.cx_type.kind <= CXType_LastBuiltin) {
|
||||||
if (!g_index_builtin_types)
|
// For builtin types, use type kinds as USR hash.
|
||||||
return nullopt;
|
|
||||||
return db->ToTypeId(type.cx_type.kind);
|
return db->ToTypeId(type.cx_type.kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,11 +75,7 @@ struct InitializeHandler : BaseMessageHandler<Ipc_InitializeRequest> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_index_builtin_types = config->index.builtinTypes;
|
g_enable_comments = config->index.comments;
|
||||||
// TODO Remove enableComments
|
|
||||||
if (config->index.comments > 0)
|
|
||||||
config->enableComments = config->index.comments;
|
|
||||||
g_enable_comments = config->enableComments;
|
|
||||||
|
|
||||||
// Client capabilities
|
// Client capabilities
|
||||||
if (request->params.capabilities.textDocument) {
|
if (request->params.capabilities.textDocument) {
|
||||||
|
2
third_party/loguru
vendored
2
third_party/loguru
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 2c35b5e7251ab5d364b1b3164eccef7b5d2293c5
|
Subproject commit 37e48808d720194199bc273be4184402a0bc394a
|
Loading…
Reference in New Issue
Block a user