diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dev/architecture.md | 4 | ||||
-rw-r--r-- | docs/dev/guide.md | 8 | ||||
-rw-r--r-- | docs/user/assists.md | 4 | ||||
-rw-r--r-- | docs/user/readme.adoc | 11 |
4 files changed, 19 insertions, 8 deletions
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md index 3a337c574..cee916c09 100644 --- a/docs/dev/architecture.md +++ b/docs/dev/architecture.md | |||
@@ -46,7 +46,7 @@ can be quickly updated for small modifications. | |||
46 | 46 | ||
47 | Some of the components of this repository are generated through automatic | 47 | Some of the components of this repository are generated through automatic |
48 | processes. `cargo xtask codegen` runs all generation tasks. Generated code is | 48 | processes. `cargo xtask codegen` runs all generation tasks. Generated code is |
49 | commited to the git repository. | 49 | committed to the git repository. |
50 | 50 | ||
51 | In particular, `cargo xtask codegen` generates: | 51 | In particular, `cargo xtask codegen` generates: |
52 | 52 | ||
@@ -114,7 +114,7 @@ is responsible for guessing a HIR for a particular source position. | |||
114 | Underneath, HIR works on top of salsa, using a `HirDatabase` trait. | 114 | Underneath, HIR works on top of salsa, using a `HirDatabase` trait. |
115 | 115 | ||
116 | `ra_hir_xxx` crates have a strong ECS flavor, in that they work with raw ids and | 116 | `ra_hir_xxx` crates have a strong ECS flavor, in that they work with raw ids and |
117 | directly query the databse. | 117 | directly query the database. |
118 | 118 | ||
119 | The top-level `ra_hir` façade crate wraps ids into a more OO-flavored API. | 119 | The top-level `ra_hir` façade crate wraps ids into a more OO-flavored API. |
120 | 120 | ||
diff --git a/docs/dev/guide.md b/docs/dev/guide.md index abbe4c154..c3252f1f6 100644 --- a/docs/dev/guide.md +++ b/docs/dev/guide.md | |||
@@ -26,7 +26,7 @@ properties hold: | |||
26 | 26 | ||
27 | ## IDE API | 27 | ## IDE API |
28 | 28 | ||
29 | To see the bigger picture of how the IDE features works, let's take a look at the [`AnalysisHost`] and | 29 | To see the bigger picture of how the IDE features work, let's take a look at the [`AnalysisHost`] and |
30 | [`Analysis`] pair of types. `AnalysisHost` has three methods: | 30 | [`Analysis`] pair of types. `AnalysisHost` has three methods: |
31 | 31 | ||
32 | * `default()` for creating an empty analysis instance | 32 | * `default()` for creating an empty analysis instance |
@@ -131,7 +131,7 @@ mapping between `SourceRoot` IDs (which are assigned by the client) and actual | |||
131 | analyzer. | 131 | analyzer. |
132 | 132 | ||
133 | Note that `mod`, `#[path]` and `include!()` can only reference files from the | 133 | Note that `mod`, `#[path]` and `include!()` can only reference files from the |
134 | same source root. It is of course is possible to explicitly add extra files to | 134 | same source root. It is of course possible to explicitly add extra files to |
135 | the source root, even `/dev/random`. | 135 | the source root, even `/dev/random`. |
136 | 136 | ||
137 | ## Language Server Protocol | 137 | ## Language Server Protocol |
@@ -192,7 +192,7 @@ task will be canceled as soon as the main loop calls `apply_change` on the | |||
192 | [`schedule`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L426-L455 | 192 | [`schedule`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L426-L455 |
193 | [The task]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop/handlers.rs#L205-L223 | 193 | [The task]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop/handlers.rs#L205-L223 |
194 | 194 | ||
195 | This concludes the overview of the analyzer's programing *interface*. Next, lets | 195 | This concludes the overview of the analyzer's programing *interface*. Next, let's |
196 | dig into the implementation! | 196 | dig into the implementation! |
197 | 197 | ||
198 | ## Salsa | 198 | ## Salsa |
@@ -480,7 +480,7 @@ throughout the analyzer: | |||
480 | ## Source Map pattern | 480 | ## Source Map pattern |
481 | 481 | ||
482 | Due to an obscure edge case in completion, IDE needs to know the syntax node of | 482 | Due to an obscure edge case in completion, IDE needs to know the syntax node of |
483 | an use statement which imported the given completion candidate. We can't just | 483 | a use statement which imported the given completion candidate. We can't just |
484 | store the syntax node as a part of name resolution: this will break | 484 | store the syntax node as a part of name resolution: this will break |
485 | incrementality, due to the fact that syntax changes after every file | 485 | incrementality, due to the fact that syntax changes after every file |
486 | modification. | 486 | modification. |
diff --git a/docs/user/assists.md b/docs/user/assists.md index a421aa0c3..ee515949e 100644 --- a/docs/user/assists.md +++ b/docs/user/assists.md | |||
@@ -175,7 +175,9 @@ trait Trait<T> { | |||
175 | } | 175 | } |
176 | 176 | ||
177 | impl Trait<u32> for () { | 177 | impl Trait<u32> for () { |
178 | fn foo(&self) -> u32 { todo!() } | 178 | fn foo(&self) -> u32 { |
179 | todo!() | ||
180 | } | ||
179 | 181 | ||
180 | } | 182 | } |
181 | ``` | 183 | ``` |
diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc index 4cb1e23e8..b1af72ce6 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc | |||
@@ -201,7 +201,7 @@ let g:LanguageClient_serverCommands = { | |||
201 | 201 | ||
202 | 2. Configure by adding this to your vim/neovim config file (replacing the existing Rust-specific line if it exists): | 202 | 2. Configure by adding this to your vim/neovim config file (replacing the existing Rust-specific line if it exists): |
203 | + | 203 | + |
204 | [source,vim] | 204 | [source,vim] |
205 | ---- | 205 | ---- |
206 | let g:ycm_language_server = | 206 | let g:ycm_language_server = |
207 | \ [ | 207 | \ [ |
@@ -252,6 +252,15 @@ If it worked, you should see "rust-analyzer, Line X, Column Y" on the left side | |||
252 | 252 | ||
253 | If you get an error saying `No such file or directory: 'rust-analyzer'`, see the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>> section on installing the language server binary. | 253 | If you get an error saying `No such file or directory: 'rust-analyzer'`, see the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>> section on installing the language server binary. |
254 | 254 | ||
255 | === Gnome Builder | ||
256 | |||
257 | Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>. | ||
258 | |||
259 | Gnome Builder currently has support for RLS, and there's no way to configure the language server executable. A future version might support `rust-analyzer` out of the box. | ||
260 | |||
261 | 1. Rename, symlink or copy the `rust-analyzer` binary to `rls` and place it somewhere Builder can find (in `PATH`, or under `~/.cargo/bin`). | ||
262 | 2. Enable the Rust Builder plugin. | ||
263 | |||
255 | == Usage | 264 | == Usage |
256 | 265 | ||
257 | See https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/features.md[features.md]. | 266 | See https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/features.md[features.md]. |