aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user')
-rw-r--r--docs/user/features.md48
-rw-r--r--docs/user/readme.adoc7
2 files changed, 7 insertions, 48 deletions
diff --git a/docs/user/features.md b/docs/user/features.md
index ba7ca15a6..ff8cb2d6e 100644
--- a/docs/user/features.md
+++ b/docs/user/features.md
@@ -5,60 +5,12 @@ you can use <kbd>Ctrl+Shift+P</kbd> to search for the corresponding action.
5### Commands <kbd>ctrl+shift+p</kbd> 5### Commands <kbd>ctrl+shift+p</kbd>
6 6
7 7
8
9
10#### Expand Macro Recursively
11
12Shows the full macro expansion of the macro at current cursor.
13
14#### Status
15
16Shows internal statistic about memory usage of rust-analyzer.
17
18#### Show RA Version
19
20Show current rust-analyzer version.
21
22#### Toggle inlay hints 8#### Toggle inlay hints
23 9
24Toggle inlay hints view for the current workspace. 10Toggle inlay hints view for the current workspace.
25It is recommended to assign a shortcut for this command to quickly turn off 11It is recommended to assign a shortcut for this command to quickly turn off
26inlay hints when they prevent you from reading/writing the code. 12inlay hints when they prevent you from reading/writing the code.
27 13
28#### Run Garbage Collection
29
30Manually triggers GC.
31
32#### Start Cargo Watch
33
34Start `cargo watch` for live error highlighting. Will prompt to install if it's not already installed.
35
36#### Stop Cargo Watch
37
38Stop `cargo watch`.
39
40#### Structural Seach and Replace
41
42Search and replace with named wildcards that will match any expression.
43The syntax for a structural search replace command is `<search_pattern> ==>> <replace_pattern>`. A `$<name>:expr` placeholder in the search pattern will match any expression and `$<name>` will reference it in the replacement. Available via the command `rust-analyzer.ssr`.
44
45```rust
46// Using structural search replace command [foo($a:expr, $b:expr) ==>> ($a).foo($b)]
47
48// BEFORE
49String::from(foo(y + 5, z))
50
51// AFTER
52String::from((y + 5).foo(z))
53```
54
55### Assists (Code Actions)
56
57Assists, or code actions, are small local refactorings, available in a particular context.
58They are usually triggered by a shortcut or by clicking a light bulb icon in the editor.
59
60See [assists.md](./assists.md) for the list of available assists.
61
62### Magic Completions 14### Magic Completions
63 15
64In addition to usual reference completion, rust-analyzer provides some ✨magic✨ 16In addition to usual reference completion, rust-analyzer provides some ✨magic✨
diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc
index 7b159bfc6..8cfa41144 100644
--- a/docs/user/readme.adoc
+++ b/docs/user/readme.adoc
@@ -272,3 +272,10 @@ Gnome Builder currently has support for RLS, and there's no way to configure the
272== Features 272== Features
273 273
274include::./generated_features.adoc[] 274include::./generated_features.adoc[]
275
276== Assists (Code Actions)
277
278Assists, or code actions, are small local refactorings, available in a particular context.
279They are usually triggered by a shortcut or by clicking a light bulb icon in the editor.
280
281See [assists.md](./assists.md) for the list of available assists.