aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-19 20:06:33 +0000
committerAleksey Kladov <[email protected]>2019-01-21 08:27:01 +0000
commit6789e5a6e788c06ab4605bf642b545243ee9ae7d (patch)
treec525cffd8ddde306e68ba1d457dbdb1546f94076
parent11bdb7835ffa4a7a3ceee7cddb0ba4696fc652f4 (diff)
start completions walkthrough
-rw-r--r--guide.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/guide.md b/guide.md
index f8286f6fa..f0a2d60b8 100644
--- a/guide.md
+++ b/guide.md
@@ -515,3 +515,15 @@ construct a mapping from `ExprId`s to types.
515[type-inference]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_hir/src/ty.rs#L1208-L1223 515[type-inference]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_hir/src/ty.rs#L1208-L1223
516 516
517## Tying it all together: completion 517## Tying it all together: completion
518
519To conclude the overview of the rust analyzer, let's trace the request for
520(type-inference powered!) code completion!
521
522We start by [receiving a message] from the language client. We decode the
523message as a request for completion and [schedule it on the threadpool]. This is
524the place where we [catch] canceled error if, immediately after completion, the
525client sends some modification.
526
527[receiving a message]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L203
528[schedule it on the threadpool]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L428
529[catch]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L436-L442