diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dev/README.md | 8 | ||||
-rw-r--r-- | docs/dev/architecture.md | 3 | ||||
-rw-r--r-- | docs/dev/lsp-extensions.md | 8 | ||||
-rw-r--r-- | docs/user/manual.adoc | 4 |
4 files changed, 9 insertions, 14 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md index 3af01cd6b..2bb2f75bd 100644 --- a/docs/dev/README.md +++ b/docs/dev/README.md | |||
@@ -397,13 +397,7 @@ To log all communication between the server and the client, there are two choice | |||
397 | 397 | ||
398 | There are also two VS Code commands which might be of interest: | 398 | There are also two VS Code commands which might be of interest: |
399 | 399 | ||
400 | * `Rust Analyzer: Status` shows some memory-usage statistics. To take full | 400 | * `Rust Analyzer: Status` shows some memory-usage statistics. |
401 | advantage of it, you need to compile rust-analyzer with jemalloc support: | ||
402 | ``` | ||
403 | $ cargo install --path crates/rust-analyzer --force --features jemalloc | ||
404 | ``` | ||
405 | |||
406 | There's an alias for this: `cargo xtask install --server --jemalloc`. | ||
407 | 401 | ||
408 | * `Rust Analyzer: Syntax Tree` shows syntax tree of the current file/selection. | 402 | * `Rust Analyzer: Syntax Tree` shows syntax tree of the current file/selection. |
409 | 403 | ||
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md index cee916c09..d0c6eea61 100644 --- a/docs/dev/architecture.md +++ b/docs/dev/architecture.md | |||
@@ -170,8 +170,7 @@ The innermost and most elaborate boundary is `hir`. It has a much richer | |||
170 | vocabulary of types than `ide`, but the basic testing setup is the same: we | 170 | vocabulary of types than `ide`, but the basic testing setup is the same: we |
171 | create a database, run some queries, assert result. | 171 | create a database, run some queries, assert result. |
172 | 172 | ||
173 | For comparisons, we use [insta](https://github.com/mitsuhiko/insta/) library for | 173 | For comparisons, we use the `expect` crate for snapshot testing. |
174 | snapshot testing. | ||
175 | 174 | ||
176 | To test various analysis corner cases and avoid forgetting about old tests, we | 175 | To test various analysis corner cases and avoid forgetting about old tests, we |
177 | use so-called marks. See the `marks` module in the `test_utils` crate for more. | 176 | use so-called marks. See the `marks` module in the `test_utils` crate for more. |
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index 6d6bbac7c..98d14450b 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md | |||
@@ -11,11 +11,13 @@ If you want to be notified about the changes to this document, subscribe to [#46 | |||
11 | 11 | ||
12 | ## `initializationOptions` | 12 | ## `initializationOptions` |
13 | 13 | ||
14 | As `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration. | 14 | For `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration. |
15 | That is, `rust-analyzer` usually sends `"workspace/configuration"` request with `{ "items": ["rust-analyzer"] }` payload. | 15 | That is, `rust-analyzer` usually sends `"workspace/configuration"` request with `{ "items": ["rust-analyzer"] }` payload. |
16 | `initializationOptions` should contain the same data that would be in the first item of the result. | 16 | `initializationOptions` should contain the same data that would be in the first item of the result. |
17 | It's OK to not send anything, then all the settings would take their default values. | 17 | If a language client does not know about `rust-analyzer`'s configuration options it can get sensible defaults by doing any of the following: |
18 | However, some settings can not be changed after startup at the moment. | 18 | * Not sending `initializationOptions` |
19 | * Send `"initializationOptions": null` | ||
20 | * Send `"initializationOptions": {}` | ||
19 | 21 | ||
20 | ## Snippet `TextEdit` | 22 | ## Snippet `TextEdit` |
21 | 23 | ||
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc index 2a58cd85f..4b31145de 100644 --- a/docs/user/manual.adoc +++ b/docs/user/manual.adoc | |||
@@ -110,8 +110,8 @@ Here are some useful self-diagnostic commands: | |||
110 | * **Rust Analyzer: Show RA Version** shows the version of `rust-analyzer` binary | 110 | * **Rust Analyzer: Show RA Version** shows the version of `rust-analyzer` binary |
111 | * **Rust Analyzer: Status** prints some statistics about the server, like the few latest LSP requests | 111 | * **Rust Analyzer: Status** prints some statistics about the server, like the few latest LSP requests |
112 | * To enable server-side logging, run with `env RA_LOG=info` and see `Output > Rust Analyzer Language Server` in VS Code's panel. | 112 | * To enable server-side logging, run with `env RA_LOG=info` and see `Output > Rust Analyzer Language Server` in VS Code's panel. |
113 | * To log all LSP requests, add `"rust-analyzer.trace.server": "verbose"` to the settings and look for `Server Trace` in the panel. | 113 | * To log all LSP requests, add `"rust-analyzer.trace.server": "verbose"` to the settings and look for `Rust Analyzer Language Server Trace` in the panel. |
114 | * To enable client-side logging, add `"rust-analyzer.trace.extension": true` to the settings and open the `Console` tab of VS Code developer tools. | 114 | * To enable client-side logging, add `"rust-analyzer.trace.extension": true` to the settings and open `Output > Rust Analyzer Client` in the panel. |
115 | 115 | ||
116 | === rust-analyzer Language Server Binary | 116 | === rust-analyzer Language Server Binary |
117 | 117 | ||