You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/features.md
-48Lines changed: 0 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,60 +5,12 @@ you can use <kbd>Ctrl+Shift+P</kbd> to search for the corresponding action.
5
5
### Commands <kbd>ctrl+shift+p</kbd>
6
6
7
7
8
-
9
-
10
-
#### Expand Macro Recursively
11
-
12
-
Shows the full macro expansion of the macro at current cursor.
13
-
14
-
#### Status
15
-
16
-
Shows internal statistic about memory usage of rust-analyzer.
17
-
18
-
#### Show RA Version
19
-
20
-
Show current rust-analyzer version.
21
-
22
8
#### Toggle inlay hints
23
9
24
10
Toggle inlay hints view for the current workspace.
25
11
It is recommended to assign a shortcut for this command to quickly turn off
26
12
inlay hints when they prevent you from reading/writing the code.
27
13
28
-
#### Run Garbage Collection
29
-
30
-
Manually triggers GC.
31
-
32
-
#### Start Cargo Watch
33
-
34
-
Start `cargo watch` for live error highlighting. Will prompt to install if it's not already installed.
35
-
36
-
#### Stop Cargo Watch
37
-
38
-
Stop `cargo watch`.
39
-
40
-
#### Structural Seach and Replace
41
-
42
-
Search and replace with named wildcards that will match any expression.
43
-
The 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
49
-
String::from(foo(y+5, z))
50
-
51
-
// AFTER
52
-
String::from((y+5).foo(z))
53
-
```
54
-
55
-
### Assists (Code Actions)
56
-
57
-
Assists, or code actions, are small local refactorings, available in a particular context.
58
-
They are usually triggered by a shortcut or by clicking a light bulb icon in the editor.
59
-
60
-
See [assists.md](./assists.md) for the list of available assists.
61
-
62
14
### Magic Completions
63
15
64
16
In addition to usual reference completion, rust-analyzer provides some ✨magic✨
0 commit comments