Skip to content

Commit 98f2cfd

Browse files
Improve contributing/README.md
1 parent 8d7cda3 commit 98f2cfd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/book/src/contributing/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
rust-analyzer is an ordinary Rust project, which is organized as a Cargo workspace, builds on stable and doesn't depend on C libraries.
44
So, 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.
141141
Setting 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`.
144144
This shows `eprintln!` as well.
145145
Note that `stdout` is used for the actual protocol, so `println!` will break things.
146146

147147
To 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

181181
We have a built-in hierarchical profiler, you can enable it by using `RA_PROFILE` env-var:
182182

183-
```
183+
```bash
184184
RA_PROFILE=* // dump everything
185185
RA_PROFILE=foo|bar|baz // enabled only selected entries
186186
RA_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
191191
For machine-readable JSON output, we have the `RA_PROFILE_JSON` env variable. We support
192192
filtering only by span name:
193193
194-
```
194+
```bash
195195
RA_PROFILE=* // dump everything
196196
RA_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
202202
To 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
208208
For 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

Comments
 (0)