aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-12-23 07:47:40 +0000
committerGitHub <[email protected]>2020-12-23 07:47:40 +0000
commit58b6763f206b80a3000eb3c7642181fa5fb98229 (patch)
tree65c66a9bec9b74049ca588ffb3d4a47337486280
parentf7f85cdd8d0660e3556c15864efd6158f114e343 (diff)
parent7c07bb63814671f88677c08ddd75862338e40330 (diff)
Merge #7012
7012: Document, how to view config in effect r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r--crates/rust-analyzer/src/config.rs4
-rw-r--r--docs/user/manual.adoc3
2 files changed, 5 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 11cdae57f..1db5b4e7d 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -349,12 +349,12 @@ impl Config {
349 res 349 res
350 } 350 }
351 pub fn update(&mut self, json: serde_json::Value) { 351 pub fn update(&mut self, json: serde_json::Value) {
352 log::info!("Config::update({:#})", json); 352 log::info!("updating config from JSON: {:#}", json);
353 if json.is_null() || json.as_object().map_or(false, |it| it.is_empty()) { 353 if json.is_null() || json.as_object().map_or(false, |it| it.is_empty()) {
354 return; 354 return;
355 } 355 }
356 self.do_update(json); 356 self.do_update(json);
357 log::info!("Config::update() = {:#?}", self); 357 log::info!("updated config: {:#?}", self);
358 } 358 }
359 fn do_update(&mut self, json: serde_json::Value) { 359 fn do_update(&mut self, json: serde_json::Value) {
360 let data = ConfigData::from_json(json); 360 let data = ConfigData::from_json(json);
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index 40f10972f..e3082d584 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -302,6 +302,9 @@ If the LSP binary is not available, GNOME Builder can install it when opening a
302rust-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. 302rust-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.
303Please consult your editor's documentation to learn how to configure LSP servers. 303Please consult your editor's documentation to learn how to configure LSP servers.
304 304
305To verify which configuration is actually used by rust-analyzer, set `RA_LOG` environment variable to `rust_analyzer=info` and look for config-related messages.
306Logs should show both the JSON that rust-analyzer sees as well as the updated config.
307
305This is the list of config options rust-analyzer supports: 308This is the list of config options rust-analyzer supports:
306 309
307include::./generated_config.adoc[] 310include::./generated_config.adoc[]