mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-22 16:39:48 +00:00
Enable make* indexing by default
This commit is contained in:
parent
8108de0cfa
commit
a2c1cb4a83
12
src/config.h
12
src/config.h
@ -146,9 +146,13 @@ struct Config {
|
|||||||
// - https://github.com/autozimu/LanguageClient-neovim/issues/224
|
// - https://github.com/autozimu/LanguageClient-neovim/issues/224
|
||||||
int comments = 2;
|
int comments = 2;
|
||||||
|
|
||||||
// A hack to convert calls of make_shared/make_unique and other |Make|
|
// Attempt to convert calls of make* functions to constructors based on
|
||||||
// variants to constructor calls.
|
// hueristics.
|
||||||
bool make_unique = false;
|
//
|
||||||
|
// For example, this will show constructor calls for std::make_unique
|
||||||
|
// invocations. Specifically, cquery will try to attribute a ctor call
|
||||||
|
// whenever the function name starts with make (ignoring case).
|
||||||
|
bool attributeMakeCallsToCtor = true;
|
||||||
};
|
};
|
||||||
Index index;
|
Index index;
|
||||||
|
|
||||||
@ -159,7 +163,7 @@ struct Config {
|
|||||||
};
|
};
|
||||||
MAKE_REFLECT_STRUCT(Config::ClientCapability, snippetSupport);
|
MAKE_REFLECT_STRUCT(Config::ClientCapability, snippetSupport);
|
||||||
MAKE_REFLECT_STRUCT(Config::Completion, filterAndSort);
|
MAKE_REFLECT_STRUCT(Config::Completion, filterAndSort);
|
||||||
MAKE_REFLECT_STRUCT(Config::Index, comments, make_unique);
|
MAKE_REFLECT_STRUCT(Config::Index, comments, attributeMakeCallsToCtor);
|
||||||
MAKE_REFLECT_STRUCT(Config,
|
MAKE_REFLECT_STRUCT(Config,
|
||||||
compilationDatabaseDirectory,
|
compilationDatabaseDirectory,
|
||||||
cacheDirectory,
|
cacheDirectory,
|
||||||
|
@ -504,7 +504,7 @@ struct InitializeHandler : BaseMessageHandler<Ipc_InitializeRequest> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_index_comments = config->index.comments;
|
g_index_comments = config->index.comments;
|
||||||
g_index_make_unique = config->index.make_unique;
|
g_index_make_unique = config->index.attributeMakeCallsToCtor;
|
||||||
if (config->cacheDirectory.empty()) {
|
if (config->cacheDirectory.empty()) {
|
||||||
LOG_S(ERROR) << "cacheDirectory cannot be empty.";
|
LOG_S(ERROR) << "cacheDirectory cannot be empty.";
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user