]> git.lizzy.rs Git - rust.git/commitdiff
Document, how to view config in effect
authorAleksey Kladov <aleksey.kladov@gmail.com>
Wed, 23 Dec 2020 07:47:05 +0000 (10:47 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Wed, 23 Dec 2020 07:47:05 +0000 (10:47 +0300)
crates/rust-analyzer/src/config.rs
docs/user/manual.adoc

index 11cdae57f77ca20ea8d6a7d09aed4afd3ba237ce..1db5b4e7dd9b9757359f542a4a83ae9af2fde67d 100644 (file)
@@ -349,12 +349,12 @@ pub fn new(root_path: AbsPathBuf) -> Self {
         res
     }
     pub fn update(&mut self, json: serde_json::Value) {
-        log::info!("Config::update({:#})", json);
+        log::info!("updating config from JSON: {:#}", json);
         if json.is_null() || json.as_object().map_or(false, |it| it.is_empty()) {
             return;
         }
         self.do_update(json);
-        log::info!("Config::update() = {:#?}", self);
+        log::info!("updated config: {:#?}", self);
     }
     fn do_update(&mut self, json: serde_json::Value) {
         let data = ConfigData::from_json(json);
index 40f10972f427baefa85290d24fef1c4f0157133d..e3082d5842daa4fefcffceb69e3afb0087c2bcb8 100644 (file)
@@ -302,6 +302,9 @@ If the LSP binary is not available, GNOME Builder can install it when opening a
 rust-analyzer is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files.
 Please consult your editor's documentation to learn how to configure LSP servers.
 
+To verify which configuration is actually used by rust-analyzer, set `RA_LOG` environment variable to `rust_analyzer=info` and look for config-related messages.
+Logs should show both the JSON that rust-analyzer sees as well as the updated config.
+
 This is the list of config options rust-analyzer supports:
 
 include::./generated_config.adoc[]