From d13586ac4d28da96f43665a5632034aaa7b19031 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 18 Jul 2018 10:51:18 -0700 Subject: [PATCH] --init --- src/messages/initialize.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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);