Skip to content

Commit 58b6763

Browse files
bors[bot]matklad
andauthored
Merge #7012
7012: Document, how to view config in effect r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents f7f85cd + 7c07bb6 commit 58b6763

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,12 @@ impl Config {
349349
res
350350
}
351351
pub fn update(&mut self, json: serde_json::Value) {
352-
log::info!("Config::update({:#})", json);
352+
log::info!("updating config from JSON: {:#}", json);
353353
if json.is_null() || json.as_object().map_or(false, |it| it.is_empty()) {
354354
return;
355355
}
356356
self.do_update(json);
357-
log::info!("Config::update() = {:#?}", self);
357+
log::info!("updated config: {:#?}", self);
358358
}
359359
fn do_update(&mut self, json: serde_json::Value) {
360360
let data = ConfigData::from_json(json);

docs/user/manual.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ If the LSP binary is not available, GNOME Builder can install it when opening a
302302
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.
303303
Please consult your editor's documentation to learn how to configure LSP servers.
304304

305+
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.
306+
Logs should show both the JSON that rust-analyzer sees as well as the updated config.
307+
305308
This is the list of config options rust-analyzer supports:
306309

307310
include::./generated_config.adoc[]

0 commit comments

Comments
 (0)