aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/README.md4
-rw-r--r--docs/dev/debugging.md6
-rw-r--r--docs/user/assists.md28
-rw-r--r--docs/user/readme.adoc2
4 files changed, 31 insertions, 9 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md
index a20ead0b6..65cc9fc12 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -74,7 +74,7 @@ relevant test and execute it (VS Code includes an action for running a single
74test). 74test).
75 75
76However, launching a VS Code instance with locally build language server is 76However, launching a VS Code instance with locally build language server is
77possible. There's **"Run Extension (Dev Server)"** launch configuration for this. 77possible. There's **"Run Extension (Debug Build)"** launch configuration for this.
78 78
79In general, I use one of the following workflows for fixing bugs and 79In general, I use one of the following workflows for fixing bugs and
80implementing features. 80implementing features.
@@ -86,7 +86,7 @@ then just do printf-driven development/debugging. As a sanity check after I'm
86done, I use `cargo xtask install --server` and **Reload Window** action in VS 86done, I use `cargo xtask install --server` and **Reload Window** action in VS
87Code to sanity check that the thing works as I expect. 87Code to sanity check that the thing works as I expect.
88 88
89If the problem concerns only the VS Code extension, I use **Run Extension** 89If the problem concerns only the VS Code extension, I use **Run Installed Extension**
90launch configuration from `launch.json`. Notably, this uses the usual 90launch configuration from `launch.json`. Notably, this uses the usual
91`rust-analyzer` binary from `PATH`. For this it is important to have the following 91`rust-analyzer` binary from `PATH`. For this it is important to have the following
92in `setting.json` file: 92in `setting.json` file:
diff --git a/docs/dev/debugging.md b/docs/dev/debugging.md
index 1aa392935..59a83f7d7 100644
--- a/docs/dev/debugging.md
+++ b/docs/dev/debugging.md
@@ -22,8 +22,8 @@ where **only** the `rust-analyzer` extension being debugged is enabled.
22 22
23## Debug TypeScript VSCode extension 23## Debug TypeScript VSCode extension
24 24
25- `Run Extension` - runs the extension with the globally installed `rust-analyzer` binary. 25- `Run Installed Extension` - runs the extension with the globally installed `rust-analyzer` binary.
26- `Run Extension (Dev Server)` - runs extension with the locally built LSP server (`target/debug/rust-analyzer`). 26- `Run Extension (Debug Build)` - runs extension with the locally built LSP server (`target/debug/rust-analyzer`).
27 27
28TypeScript debugging is configured to watch your source edits and recompile. 28TypeScript debugging is configured to watch your source edits and recompile.
29To apply changes to an already running debug process, press <kbd>Ctrl+Shift+P</kbd> and run the following command in your `[Extension Development Host]` 29To apply changes to an already running debug process, press <kbd>Ctrl+Shift+P</kbd> and run the following command in your `[Extension Development Host]`
@@ -47,7 +47,7 @@ To apply changes to an already running debug process, press <kbd>Ctrl+Shift+P</k
47 debug = 2 47 debug = 2
48 ``` 48 ```
49 49
50- Select `Run Extension (Dev Server)` to run your locally built `target/debug/rust-analyzer`. 50- Select `Run Extension (Debug Build)` to run your locally built `target/debug/rust-analyzer`.
51 51
52- In the original VSCode window once again select the `Attach To Server` debug configuration. 52- In the original VSCode window once again select the `Attach To Server` debug configuration.
53 53
diff --git a/docs/user/assists.md b/docs/user/assists.md
index f329fcc10..51807ffda 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -198,7 +198,7 @@ struct Ctx<T: Clone> {
198} 198}
199 199
200impl<T: Clone> Ctx<T> { 200impl<T: Clone> Ctx<T> {
201 fn new(data: T) -> Self { Self { data } } 201 fn $0new(data: T) -> Self { Self { data } }
202} 202}
203 203
204``` 204```
@@ -268,7 +268,7 @@ Change the function's return type to Result.
268fn foo() -> i32┃ { 42i32 } 268fn foo() -> i32┃ { 42i32 }
269 269
270// AFTER 270// AFTER
271fn foo() -> Result<i32, > { Ok(42i32) } 271fn foo() -> Result<i32, ${0:_}> { Ok(42i32) }
272``` 272```
273 273
274## `change_visibility` 274## `change_visibility`
@@ -325,12 +325,34 @@ enum Action { Move { distance: u32 }, Stop }
325 325
326fn handle(action: Action) { 326fn handle(action: Action) {
327 match action { 327 match action {
328 Action::Move { distance } => {} 328 $0Action::Move { distance } => {}
329 Action::Stop => {} 329 Action::Stop => {}
330 } 330 }
331} 331}
332``` 332```
333 333
334## `fix_visibility`
335
336Makes inaccessible item public.
337
338```rust
339// BEFORE
340mod m {
341 fn frobnicate() {}
342}
343fn main() {
344 m::frobnicate┃() {}
345}
346
347// AFTER
348mod m {
349 $0pub(crate) fn frobnicate() {}
350}
351fn main() {
352 m::frobnicate() {}
353}
354```
355
334## `flip_binexpr` 356## `flip_binexpr`
335 357
336Flips operands of a binary expression. 358Flips operands of a binary expression.
diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc
index 03836e6e2..40ed54809 100644
--- a/docs/user/readme.adoc
+++ b/docs/user/readme.adoc
@@ -249,7 +249,7 @@ If it worked, you should see "rust-analyzer, Line X, Column Y" on the left side
249 249
250If 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. 250If 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.
251 251
252=== Gnome Builder 252=== GNOME Builder
253 253
254Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>. 254Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>.
255 255