diff --git a/src/messages/initialize.cc b/src/messages/initialize.cc index bed6295d..ac7a0389 100644 --- a/src/messages/initialize.cc +++ b/src/messages/initialize.cc @@ -423,14 +423,6 @@ struct Handler_Initialize : BaseMessageHandler { auto& params = request->params; if (!params.rootUri) return; - { - rapidjson::StringBuffer output; - rapidjson::Writer 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()); LOG_S(INFO) << "initialize in directory " << project_path << " with uri " << params.rootUri->raw_uri; @@ -452,6 +444,12 @@ struct Handler_Initialize : BaseMessageHandler { } } + rapidjson::StringBuffer output; + rapidjson::Writer writer(output); + JsonWriter json_writer(&writer); + Reflect(json_writer, *g_config); + LOG_S(INFO) << "initializationOptions: " << output.GetString(); + if (g_config->cacheDirectory.empty()) { LOG_S(ERROR) << "cacheDirectory cannot be empty."; exit(1);