mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 00:55:08 +00:00
--init
This commit is contained in:
parent
389418f546
commit
d13586ac4d
@ -423,14 +423,6 @@ struct Handler_Initialize : BaseMessageHandler<In_InitializeRequest> {
|
|||||||
auto& params = request->params;
|
auto& params = request->params;
|
||||||
if (!params.rootUri)
|
if (!params.rootUri)
|
||||||
return;
|
return;
|
||||||
{
|
|
||||||
rapidjson::StringBuffer output;
|
|
||||||
rapidjson::Writer<rapidjson::StringBuffer> writer(output);
|
|
||||||
JsonWriter json_writer(&writer);
|
|
||||||
Reflect(json_writer, params.initializationOptions);
|
|
||||||
LOG_S(INFO) << "initializationOptions: " << output.GetString();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string project_path = NormalizePath(params.rootUri->GetPath());
|
std::string project_path = NormalizePath(params.rootUri->GetPath());
|
||||||
LOG_S(INFO) << "initialize in directory " << project_path << " with uri "
|
LOG_S(INFO) << "initialize in directory " << project_path << " with uri "
|
||||||
<< params.rootUri->raw_uri;
|
<< params.rootUri->raw_uri;
|
||||||
@ -452,6 +444,12 @@ struct Handler_Initialize : BaseMessageHandler<In_InitializeRequest> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rapidjson::StringBuffer output;
|
||||||
|
rapidjson::Writer<rapidjson::StringBuffer> writer(output);
|
||||||
|
JsonWriter json_writer(&writer);
|
||||||
|
Reflect(json_writer, *g_config);
|
||||||
|
LOG_S(INFO) << "initializationOptions: " << output.GetString();
|
||||||
|
|
||||||
if (g_config->cacheDirectory.empty()) {
|
if (g_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