diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dev/README.md | 13 | ||||
-rw-r--r-- | docs/user/manual.adoc | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md index 1b63d8223..11dc5261b 100644 --- a/docs/dev/README.md +++ b/docs/dev/README.md | |||
@@ -166,6 +166,17 @@ That said, adding an innocent-looking `pub use` is a very simple way to break en | |||
166 | Note: if you enjoyed this abstract hand-waving about boundaries, you might appreciate | 166 | Note: if you enjoyed this abstract hand-waving about boundaries, you might appreciate |
167 | https://www.tedinski.com/2018/02/06/system-boundaries.html | 167 | https://www.tedinski.com/2018/02/06/system-boundaries.html |
168 | 168 | ||
169 | ## Minimal Tests | ||
170 | |||
171 | Most tests in rust-analyzer start with a snippet of Rust code. | ||
172 | This snippets should be minimal -- if you copy-paste a snippet of real code into the tests, make sure to remove everything which could be removed. | ||
173 | There are many benefits to this: | ||
174 | |||
175 | * less to read or to scroll past | ||
176 | * easier to understand what exactly is tested | ||
177 | * less stuff printed during printf-debugging | ||
178 | * less time to run test | ||
179 | |||
169 | ## Order of Imports | 180 | ## Order of Imports |
170 | 181 | ||
171 | We separate import groups with blank lines | 182 | We separate import groups with blank lines |
@@ -348,6 +359,8 @@ To update test data, run with `UPDATE_EXPECTATIONS` variable: | |||
348 | env UPDATE_EXPECTATIONS=1 cargo qt | 359 | env UPDATE_EXPECTATIONS=1 cargo qt |
349 | ``` | 360 | ``` |
350 | 361 | ||
362 | After adding a new inline test you need to run `cargo xtest codegen` and also update the test data as described above. | ||
363 | |||
351 | # Logging | 364 | # Logging |
352 | 365 | ||
353 | Logging is done by both rust-analyzer and VS Code, so it might be tricky to | 366 | Logging is done by both rust-analyzer and VS Code, so it might be tricky to |
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc index ea714f49a..0dc1dc2ae 100644 --- a/docs/user/manual.adoc +++ b/docs/user/manual.adoc | |||
@@ -269,6 +269,10 @@ Gnome Builder currently has support for RLS, and there's no way to configure the | |||
269 | 1. Rename, symlink or copy the `rust-analyzer` binary to `rls` and place it somewhere Builder can find (in `PATH`, or under `~/.cargo/bin`). | 269 | 1. Rename, symlink or copy the `rust-analyzer` binary to `rls` and place it somewhere Builder can find (in `PATH`, or under `~/.cargo/bin`). |
270 | 2. Enable the Rust Builder plugin. | 270 | 2. Enable the Rust Builder plugin. |
271 | 271 | ||
272 | ==== GNOME Builder (Nightly) | ||
273 | |||
274 | https://nightly.gnome.org/repo/appstream/org.gnome.Builder.flatpakref[GNOME Builder (Nightly)] has now native support for `rust-analyzer` out of the box. If the `rust-analyzer` binary is not available, GNOME Builder can install it when opening a Rust source file. | ||
275 | |||
272 | == Non-Cargo Based Projects | 276 | == Non-Cargo Based Projects |
273 | 277 | ||
274 | rust-analyzer does not require Cargo. | 278 | rust-analyzer does not require Cargo. |
@@ -318,6 +322,8 @@ There are tree ways to feed `rust-project.json` to rust-analyzer: | |||
318 | * Specify `"rust-analyzer.linkedProjects": [ "path/to/rust-project.json" ]` in the settings (and make sure that your LSP client sends settings as a part of initialize request). | 322 | * Specify `"rust-analyzer.linkedProjects": [ "path/to/rust-project.json" ]` in the settings (and make sure that your LSP client sends settings as a part of initialize request). |
319 | * Specify `"rust-analyzer.linkedProjects": [ { "roots": [...], "crates": [...] }]` inline. | 323 | * Specify `"rust-analyzer.linkedProjects": [ { "roots": [...], "crates": [...] }]` inline. |
320 | 324 | ||
325 | Relative paths are interpreted relative to `rust-project.json` file location or (for inline JSON) relative to `rootUri`. | ||
326 | |||
321 | See https://github.com/rust-analyzer/rust-project.json-example for a small example. | 327 | See https://github.com/rust-analyzer/rust-project.json-example for a small example. |
322 | 328 | ||
323 | == Features | 329 | == Features |