33rust-analyzer is an ordinary Rust project, which is organized as a Cargo workspace, builds on stable and doesn't depend on C libraries.
44So, just
55
6- ```
6+ ``` bash
77$ cargo test
88```
99
@@ -140,15 +140,15 @@ By default, log goes to stderr, but the stderr itself is processed by VS Code.
140140` --log-file <PATH> ` CLI argument allows logging to file.
141141Setting the ` RA_LOG_FILE=<PATH> ` environment variable will also log to file, it will also override ` --log-file ` .
142142
143- To see stderr in the running VS Code instance, go to the "Output" tab of the panel and select ` rust-analyzer ` .
143+ To see stderr in the running VS Code instance, go to the "Output" tab of the panel and select ` Rust Analyzer Client ` .
144144This shows ` eprintln! ` as well.
145145Note that ` stdout ` is used for the actual protocol, so ` println! ` will break things.
146146
147147To log all communication between the server and the client, there are two choices:
148148
149149* You can log on the server side, by running something like
150150
151- ```
151+ ``` bash
152152 env RA_LOG=lsp_server=debug code .
153153 ```
154154
@@ -180,7 +180,7 @@ There are also several VS Code commands which might be of interest:
180180
181181We have a built-in hierarchical profiler, you can enable it by using ` RA_PROFILE ` env-var:
182182
183- ```
183+ ``` bash
184184RA_PROFILE=* // dump everything
185185RA_PROFILE=foo| bar| baz // enabled only selected entries
186186RA_PROFILE=* @3> 10 // dump everything, up to depth 3, if it takes more than 10 ms
@@ -191,7 +191,7 @@ Some rust-analyzer contributors have `export RA_PROFILE='*>10'` in my shell prof
191191For machine-readable JSON output, we have the ` RA_PROFILE_JSON` env variable. We support
192192filtering only by span name:
193193
194- ```
194+ ` ` ` bash
195195RA_PROFILE=* // dump everything
196196RA_PROFILE_JSON=" vfs_load|parallel_prime_caches|discover_command" // dump selected spans
197197` ` `
@@ -201,13 +201,13 @@ It is enabled by `RA_COUNT=1`.
201201
202202To measure time for from-scratch analysis, use something like this:
203203
204- ```
204+ ` ` ` bash
205205$ cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
206206` ` `
207207
208208For measuring time of incremental analysis, use either of these:
209209
210- ```
210+ ` ` ` bash
211211$ cargo run --release -p rust-analyzer -- analysis-bench ../chalk/ --highlight ../chalk/chalk-engine/src/logic.rs
212212$ cargo run --release -p rust-analyzer -- analysis-bench ../chalk/ --complete ../chalk/chalk-engine/src/logic.rs:94:0
213213` ` `
@@ -220,7 +220,7 @@ Release process is handled by `release`, `dist`, `publish-release-notes` and `pr
220220
221221` release` assumes that you have checkouts of ` rust-analyzer` , ` rust-analyzer.github.io` , and ` rust-lang/rust` in the same directory:
222222
223- ```
223+ ` ` ` bash
224224./rust-analyzer
225225./rust-analyzer.github.io
226226./rust-rust-analyzer # Note the name!
0 commit comments