diff options
-rw-r--r-- | docs/dev/README.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md index 46ee030fc..0330939b6 100644 --- a/docs/dev/README.md +++ b/docs/dev/README.md | |||
@@ -55,7 +55,7 @@ You can run `cargo xtask install-pre-commit-hook` to install git-hook to run rus | |||
55 | All Rust code lives in the `crates` top-level directory, and is organized as a | 55 | All Rust code lives in the `crates` top-level directory, and is organized as a |
56 | single Cargo workspace. The `editors` top-level directory contains code for | 56 | single Cargo workspace. The `editors` top-level directory contains code for |
57 | integrating with editors. Currently, it contains the plugin for VS Code (in | 57 | integrating with editors. Currently, it contains the plugin for VS Code (in |
58 | typescript). The `docs` top-level directory contains both developer and user | 58 | TypeScript). The `docs` top-level directory contains both developer and user |
59 | documentation. | 59 | documentation. |
60 | 60 | ||
61 | We have some automation infra in Rust in the `xtask` package. It contains | 61 | We have some automation infra in Rust in the `xtask` package. It contains |
@@ -79,8 +79,8 @@ possible. There's **"Run Extension (Debug Build)"** launch configuration for thi | |||
79 | In general, I use one of the following workflows for fixing bugs and | 79 | In general, I use one of the following workflows for fixing bugs and |
80 | implementing features. | 80 | implementing features. |
81 | 81 | ||
82 | If the problem concerns only internal parts of rust-analyzer (ie, I don't need | 82 | If the problem concerns only internal parts of rust-analyzer (i.e. I don't need |
83 | to touch `rust-analyzer` crate or typescript code), there is a unit-test for it. | 83 | to touch `rust-analyzer` crate or TypeScript code), there is a unit-test for it. |
84 | So, I use **Rust Analyzer: Run** action in VS Code to run this single test, and | 84 | So, I use **Rust Analyzer: Run** action in VS Code to run this single test, and |
85 | then just do printf-driven development/debugging. As a sanity check after I'm | 85 | then just do printf-driven development/debugging. As a sanity check after I'm |
86 | done, I use `cargo xtask install --server` and **Reload Window** action in VS | 86 | done, I use `cargo xtask install --server` and **Reload Window** action in VS |
@@ -279,7 +279,7 @@ always obvious from the low-level code. | |||
279 | Syntax trees are by design incomplete and do not enforce well-formedness. | 279 | Syntax trees are by design incomplete and do not enforce well-formedness. |
280 | If ast method returns an `Option`, it *can* be `None` at runtime, even if this is forbidden by the grammar. | 280 | If ast method returns an `Option`, it *can* be `None` at runtime, even if this is forbidden by the grammar. |
281 | 281 | ||
282 | ## LSP indenpendence | 282 | ## LSP independence |
283 | 283 | ||
284 | rust-analyzer is independent from LSP. | 284 | rust-analyzer is independent from LSP. |
285 | It provides features for a hypothetical perfect Rust-specific IDE client. | 285 | It provides features for a hypothetical perfect Rust-specific IDE client. |
@@ -289,7 +289,7 @@ Internal representations are lowered to LSP in the `rust-analyzer` crate (the on | |||
289 | 289 | ||
290 | There's a semi-hard split between "compiler" and "IDE", at the `ra_hir` crate. | 290 | There's a semi-hard split between "compiler" and "IDE", at the `ra_hir` crate. |
291 | Compiler derives new facts about source code. | 291 | Compiler derives new facts about source code. |
292 | It explicitly acknowledges that not all info is available (ie, you can't look at types during name resolution). | 292 | It explicitly acknowledges that not all info is available (i.e. you can't look at types during name resolution). |
293 | 293 | ||
294 | IDE assumes that all information is available at all times. | 294 | IDE assumes that all information is available at all times. |
295 | 295 | ||
@@ -345,8 +345,8 @@ There's also two VS Code commands which might be of interest: | |||
345 | rust code that it refers to and the rust editor will also highlight the proper | 345 | rust code that it refers to and the rust editor will also highlight the proper |
346 | text range. | 346 | text range. |
347 | 347 | ||
348 | If you press <kbd>Ctrl</kbd> (i.e. trigger goto definition) in the inspected | 348 | If you trigger Go to Definition in the inspected Rust source file, |
349 | Rust source file the syntax tree read-only editor should scroll to and select the | 349 | the syntax tree read-only editor should scroll to and select the |
350 | appropriate syntax node token. | 350 | appropriate syntax node token. |
351 | 351 | ||
352 | ![demo](https://user-images.githubusercontent.com/36276403/78225773-6636a480-74d3-11ea-9d9f-1c9d42da03b0.png) | 352 | ![demo](https://user-images.githubusercontent.com/36276403/78225773-6636a480-74d3-11ea-9d9f-1c9d42da03b0.png) |