Doc more features
This commit is contained in:
parent
8915183d7d
commit
b795a07320
5 changed files with 47 additions and 54 deletions
|
|
@ -5,60 +5,12 @@ you can use <kbd>Ctrl+Shift+P</kbd> to search for the corresponding action.
|
|||
### Commands <kbd>ctrl+shift+p</kbd>
|
||||
|
||||
|
||||
|
||||
|
||||
#### Expand Macro Recursively
|
||||
|
||||
Shows the full macro expansion of the macro at current cursor.
|
||||
|
||||
#### Status
|
||||
|
||||
Shows internal statistic about memory usage of rust-analyzer.
|
||||
|
||||
#### Show RA Version
|
||||
|
||||
Show current rust-analyzer version.
|
||||
|
||||
#### Toggle inlay hints
|
||||
|
||||
Toggle inlay hints view for the current workspace.
|
||||
It is recommended to assign a shortcut for this command to quickly turn off
|
||||
inlay hints when they prevent you from reading/writing the code.
|
||||
|
||||
#### Run Garbage Collection
|
||||
|
||||
Manually triggers GC.
|
||||
|
||||
#### Start Cargo Watch
|
||||
|
||||
Start `cargo watch` for live error highlighting. Will prompt to install if it's not already installed.
|
||||
|
||||
#### Stop Cargo Watch
|
||||
|
||||
Stop `cargo watch`.
|
||||
|
||||
#### Structural Seach and Replace
|
||||
|
||||
Search and replace with named wildcards that will match any expression.
|
||||
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`.
|
||||
|
||||
```rust
|
||||
// Using structural search replace command [foo($a:expr, $b:expr) ==>> ($a).foo($b)]
|
||||
|
||||
// BEFORE
|
||||
String::from(foo(y + 5, z))
|
||||
|
||||
// AFTER
|
||||
String::from((y + 5).foo(z))
|
||||
```
|
||||
|
||||
### Assists (Code Actions)
|
||||
|
||||
Assists, or code actions, are small local refactorings, available in a particular context.
|
||||
They are usually triggered by a shortcut or by clicking a light bulb icon in the editor.
|
||||
|
||||
See [assists.md](./assists.md) for the list of available assists.
|
||||
|
||||
### Magic Completions
|
||||
|
||||
In addition to usual reference completion, rust-analyzer provides some ✨magic✨
|
||||
|
|
|
|||
|
|
@ -272,3 +272,10 @@ Gnome Builder currently has support for RLS, and there's no way to configure the
|
|||
== Features
|
||||
|
||||
include::./generated_features.adoc[]
|
||||
|
||||
== Assists (Code Actions)
|
||||
|
||||
Assists, or code actions, are small local refactorings, available in a particular context.
|
||||
They are usually triggered by a shortcut or by clicking a light bulb icon in the editor.
|
||||
|
||||
See [assists.md](./assists.md) for the list of available assists.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue