aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/README.md2
-rw-r--r--docs/dev/architecture.md3
-rw-r--r--docs/user/manual.adoc27
3 files changed, 27 insertions, 5 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md
index f87462400..3af01cd6b 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -314,7 +314,7 @@ We don't have specific rules around git history hygiene.
314Maintaining clean git history is encouraged, but not enforced. 314Maintaining clean git history is encouraged, but not enforced.
315We use rebase workflow, it's OK to rewrite history during PR review process. 315We use rebase workflow, it's OK to rewrite history during PR review process.
316 316
317Avoid @mentioning people in commit messages, as such messages create a lot of duplicate notification traffic during rebases. 317Avoid @mentioning people in commit messages and pull request descriptions (they are added to commit message by bors), as such messages create a lot of duplicate notification traffic during rebases.
318 318
319# Architecture Invariants 319# Architecture Invariants
320 320
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
170vocabulary of types than `ide`, but the basic testing setup is the same: we 170vocabulary of types than `ide`, but the basic testing setup is the same: we
171create a database, run some queries, assert result. 171create a database, run some queries, assert result.
172 172
173For comparisons, we use [insta](https://github.com/mitsuhiko/insta/) library for 173For comparisons, we use the `expect` crate for snapshot testing.
174snapshot testing.
175 174
176To test various analysis corner cases and avoid forgetting about old tests, we 175To test various analysis corner cases and avoid forgetting about old tests, we
177use so-called marks. See the `marks` module in the `test_utils` crate for more. 176use so-called marks. See the `marks` module in the `test_utils` crate for more.
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index 7816287e4..978b463d5 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -13,8 +13,12 @@ This manual focuses on a specific usage of the library -- running it as part of
13https://microsoft.github.io/language-server-protocol/[Language Server Protocol] (LSP). 13https://microsoft.github.io/language-server-protocol/[Language Server Protocol] (LSP).
14The LSP allows various code editors, like VS Code, Emacs or Vim, to implement semantic features like completion or goto definition by talking to an external language server process. 14The LSP allows various code editors, like VS Code, Emacs or Vim, to implement semantic features like completion or goto definition by talking to an external language server process.
15 15
16To improve this document, send a pull request against 16[TIP]
17https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/manual.adoc[this file]. 17====
18[.lead]
19To improve this document, send a pull request: +
20https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/manual.adoc[https://github.com/rust-analyzer/.../manual.adoc]
21====
18 22
19If you have questions about using rust-analyzer, please ask them in the https://users.rust-lang.org/c/ide/14["`IDEs and Editors`"] topic of Rust users forum. 23If you have questions about using rust-analyzer, please ask them in the https://users.rust-lang.org/c/ide/14["`IDEs and Editors`"] topic of Rust users forum.
20 24
@@ -369,3 +373,22 @@ Or it is possible to specify vars more granularly:
369``` 373```
370 374
371You can use any valid RegExp as a mask. Also note that a full runnable name is something like *run bin_or_example_name*, *test some::mod::test_name* or *test-mod some::mod*, so it is possible to distinguish binaries, single tests, and test modules with this masks: `"^run"`, `"^test "` (the trailing space matters!), and `"^test-mod"` respectively. 375You can use any valid RegExp as a mask. Also note that a full runnable name is something like *run bin_or_example_name*, *test some::mod::test_name* or *test-mod some::mod*, so it is possible to distinguish binaries, single tests, and test modules with this masks: `"^run"`, `"^test "` (the trailing space matters!), and `"^test-mod"` respectively.
376
377==== Compiler feedback from external commands
378
379Instead of relying on the built-in `cargo check`, you can configure Code to run a command in the background and use the `$rustc-watch` problem matcher to generate inline error markers from its output.
380
381To do this you need to create a new https://code.visualstudio.com/docs/editor/tasks[VS Code Task] and set `rust-analyzer.checkOnSave.enable: false` in preferences.
382
383For example, if you want to run https://crates.io/crates/cargo-watch[`cargo watch`] instead, you might add the following to `.vscode/tasks.json`:
384
385```json
386{
387 "label": "Watch",
388 "group": "build",
389 "type": "shell",
390 "command": "cargo watch",
391 "problemMatcher": "$rustc-watch",
392 "isBackground": true
393}
394```