diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/user/generated_features.adoc | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/docs/user/generated_features.adoc b/docs/user/generated_features.adoc index a806e3ff1..803073d55 100644 --- a/docs/user/generated_features.adoc +++ b/docs/user/generated_features.adoc | |||
@@ -1,7 +1,6 @@ | |||
1 | === Expand Macro Recursively | 1 | === Expand Macro Recursively |
2 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/expand_macro.rs[expand_macro.rs] | 2 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/expand_macro.rs[expand_macro.rs] |
3 | 3 | ||
4 | |||
5 | Shows the full macro expansion of the macro at current cursor. | 4 | Shows the full macro expansion of the macro at current cursor. |
6 | 5 | ||
7 | |=== | 6 | |=== |
@@ -14,7 +13,6 @@ Shows the full macro expansion of the macro at current cursor. | |||
14 | === Extend Selection | 13 | === Extend Selection |
15 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/extend_selection.rs[extend_selection.rs] | 14 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/extend_selection.rs[extend_selection.rs] |
16 | 15 | ||
17 | |||
18 | Extends the current selection to the encompassing syntactic construct | 16 | Extends the current selection to the encompassing syntactic construct |
19 | (expression, statement, item, module, etc). It works with multiple cursors. | 17 | (expression, statement, item, module, etc). It works with multiple cursors. |
20 | 18 | ||
@@ -28,7 +26,6 @@ Extends the current selection to the encompassing syntactic construct | |||
28 | === File Structure | 26 | === File Structure |
29 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/display/structure.rs[structure.rs] | 27 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/display/structure.rs[structure.rs] |
30 | 28 | ||
31 | |||
32 | Provides a tree of the symbols defined in the file. Can be used to | 29 | Provides a tree of the symbols defined in the file. Can be used to |
33 | 30 | ||
34 | * fuzzy search symbol in a file (super useful) | 31 | * fuzzy search symbol in a file (super useful) |
@@ -45,7 +42,6 @@ Provides a tree of the symbols defined in the file. Can be used to | |||
45 | === Go to Definition | 42 | === Go to Definition |
46 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/goto_definition.rs[goto_definition.rs] | 43 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/goto_definition.rs[goto_definition.rs] |
47 | 44 | ||
48 | |||
49 | Navigates to the definition of an identifier. | 45 | Navigates to the definition of an identifier. |
50 | 46 | ||
51 | |=== | 47 | |=== |
@@ -58,7 +54,6 @@ Navigates to the definition of an identifier. | |||
58 | === Go to Implementation | 54 | === Go to Implementation |
59 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/goto_implementation.rs[goto_implementation.rs] | 55 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/goto_implementation.rs[goto_implementation.rs] |
60 | 56 | ||
61 | |||
62 | Navigates to the impl block of structs, enums or traits. Also implemented as a code lens. | 57 | Navigates to the impl block of structs, enums or traits. Also implemented as a code lens. |
63 | 58 | ||
64 | |=== | 59 | |=== |
@@ -71,7 +66,6 @@ Navigates to the impl block of structs, enums or traits. Also implemented as a c | |||
71 | === Go to Type Definition | 66 | === Go to Type Definition |
72 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/goto_type_definition.rs[goto_type_definition.rs] | 67 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/goto_type_definition.rs[goto_type_definition.rs] |
73 | 68 | ||
74 | |||
75 | Navigates to the type of an identifier. | 69 | Navigates to the type of an identifier. |
76 | 70 | ||
77 | |=== | 71 | |=== |
@@ -84,7 +78,6 @@ Navigates to the type of an identifier. | |||
84 | === Hover | 78 | === Hover |
85 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/hover.rs[hover.rs] | 79 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/hover.rs[hover.rs] |
86 | 80 | ||
87 | |||
88 | Shows additional information, like type of an expression or documentation for definition when "focusing" code. | 81 | Shows additional information, like type of an expression or documentation for definition when "focusing" code. |
89 | Focusing is usually hovering with a mouse, but can also be triggered with a shortcut. | 82 | Focusing is usually hovering with a mouse, but can also be triggered with a shortcut. |
90 | 83 | ||
@@ -92,7 +85,6 @@ Focusing is usually hovering with a mouse, but can also be triggered with a shor | |||
92 | === Inlay Hints | 85 | === Inlay Hints |
93 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/inlay_hints.rs[inlay_hints.rs] | 86 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/inlay_hints.rs[inlay_hints.rs] |
94 | 87 | ||
95 | |||
96 | rust-analyzer shows additional information inline with the source code. | 88 | rust-analyzer shows additional information inline with the source code. |
97 | Editors usually render this using read-only virtual text snippets interspersed with code. | 89 | Editors usually render this using read-only virtual text snippets interspersed with code. |
98 | 90 | ||
@@ -116,7 +108,6 @@ https://github.com/rust-analyzer/rust-analyzer/issues/1623[1], https://github.co | |||
116 | === Join Lines | 108 | === Join Lines |
117 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/join_lines.rs[join_lines.rs] | 109 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/join_lines.rs[join_lines.rs] |
118 | 110 | ||
119 | |||
120 | Join selected lines into one, smartly fixing up whitespace, trailing commas, and braces. | 111 | Join selected lines into one, smartly fixing up whitespace, trailing commas, and braces. |
121 | 112 | ||
122 | |=== | 113 | |=== |
@@ -129,7 +120,6 @@ Join selected lines into one, smartly fixing up whitespace, trailing commas, and | |||
129 | === Magic Completions | 120 | === Magic Completions |
130 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/completion.rs[completion.rs] | 121 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/completion.rs[completion.rs] |
131 | 122 | ||
132 | |||
133 | In addition to usual reference completion, rust-analyzer provides some ✨magic✨ | 123 | In addition to usual reference completion, rust-analyzer provides some ✨magic✨ |
134 | completions as well: | 124 | completions as well: |
135 | 125 | ||
@@ -175,7 +165,6 @@ mod tests { | |||
175 | === Matching Brace | 165 | === Matching Brace |
176 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/matching_brace.rs[matching_brace.rs] | 166 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/matching_brace.rs[matching_brace.rs] |
177 | 167 | ||
178 | |||
179 | If the cursor is on any brace (`<>(){}[]`) which is a part of a brace-pair, | 168 | If the cursor is on any brace (`<>(){}[]`) which is a part of a brace-pair, |
180 | moves cursor to the matching brace. It uses the actual parser to determine | 169 | moves cursor to the matching brace. It uses the actual parser to determine |
181 | braces, so it won't confuse generics with comparisons. | 170 | braces, so it won't confuse generics with comparisons. |
@@ -190,7 +179,6 @@ braces, so it won't confuse generics with comparisons. | |||
190 | === On Typing Assists | 179 | === On Typing Assists |
191 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/typing.rs[typing.rs] | 180 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/typing.rs[typing.rs] |
192 | 181 | ||
193 | |||
194 | Some features trigger on typing certain characters: | 182 | Some features trigger on typing certain characters: |
195 | 183 | ||
196 | - typing `let =` tries to smartly add `;` if `=` is followed by an existing expression | 184 | - typing `let =` tries to smartly add `;` if `=` is followed by an existing expression |
@@ -201,7 +189,6 @@ Some features trigger on typing certain characters: | |||
201 | === Parent Module | 189 | === Parent Module |
202 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/parent_module.rs[parent_module.rs] | 190 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/parent_module.rs[parent_module.rs] |
203 | 191 | ||
204 | |||
205 | Navigates to the parent module of the current module. | 192 | Navigates to the parent module of the current module. |
206 | 193 | ||
207 | |=== | 194 | |=== |
@@ -214,7 +201,6 @@ Navigates to the parent module of the current module. | |||
214 | === Run | 201 | === Run |
215 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/runnables.rs[runnables.rs] | 202 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/runnables.rs[runnables.rs] |
216 | 203 | ||
217 | |||
218 | Shows a popup suggesting to run a test/benchmark/binary **at the current cursor | 204 | Shows a popup suggesting to run a test/benchmark/binary **at the current cursor |
219 | location**. Super useful for repeatedly running just a single test. Do bind this | 205 | location**. Super useful for repeatedly running just a single test. Do bind this |
220 | to a shortcut! | 206 | to a shortcut! |
@@ -229,7 +215,6 @@ to a shortcut! | |||
229 | === Semantic Syntax Highlighting | 215 | === Semantic Syntax Highlighting |
230 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/syntax_highlighting.rs[syntax_highlighting.rs] | 216 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/syntax_highlighting.rs[syntax_highlighting.rs] |
231 | 217 | ||
232 | |||
233 | rust-analyzer highlights the code semantically. | 218 | rust-analyzer highlights the code semantically. |
234 | For example, `bar` in `foo::Bar` might be colored differently depending on whether `Bar` is an enum or a trait. | 219 | For example, `bar` in `foo::Bar` might be colored differently depending on whether `Bar` is an enum or a trait. |
235 | rust-analyzer does not specify colors directly, instead it assigns tag (like `struct`) and a set of modifiers (like `declaration`) to each token. | 220 | rust-analyzer does not specify colors directly, instead it assigns tag (like `struct`) and a set of modifiers (like `declaration`) to each token. |
@@ -242,7 +227,6 @@ We also give special modifier for `mut` and `&mut` local variables. | |||
242 | === Show Syntax Tree | 227 | === Show Syntax Tree |
243 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/syntax_tree.rs[syntax_tree.rs] | 228 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/syntax_tree.rs[syntax_tree.rs] |
244 | 229 | ||
245 | |||
246 | Shows the parse tree of the current file. It exists mostly for debugging | 230 | Shows the parse tree of the current file. It exists mostly for debugging |
247 | rust-analyzer itself. | 231 | rust-analyzer itself. |
248 | 232 | ||
@@ -256,7 +240,6 @@ rust-analyzer itself. | |||
256 | === Status | 240 | === Status |
257 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/status.rs[status.rs] | 241 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/status.rs[status.rs] |
258 | 242 | ||
259 | |||
260 | Shows internal statistic about memory usage of rust-analyzer. | 243 | Shows internal statistic about memory usage of rust-analyzer. |
261 | 244 | ||
262 | |=== | 245 | |=== |
@@ -269,7 +252,6 @@ Shows internal statistic about memory usage of rust-analyzer. | |||
269 | === Structural Seach and Replace | 252 | === Structural Seach and Replace |
270 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/ssr.rs[ssr.rs] | 253 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/ssr.rs[ssr.rs] |
271 | 254 | ||
272 | |||
273 | Search and replace with named wildcards that will match any expression. | 255 | Search and replace with named wildcards that will match any expression. |
274 | The syntax for a structural search replace command is `<search_pattern> ==>> <replace_pattern>`. | 256 | The syntax for a structural search replace command is `<search_pattern> ==>> <replace_pattern>`. |
275 | A `$<name>:expr` placeholder in the search pattern will match any expression and `$<name>` will reference it in the replacement. | 257 | A `$<name>:expr` placeholder in the search pattern will match any expression and `$<name>` will reference it in the replacement. |
@@ -295,7 +277,6 @@ String::from((y + 5).foo(z)) | |||
295 | === Workspace Symbol | 277 | === Workspace Symbol |
296 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide_db/src/symbol_index.rs[symbol_index.rs] | 278 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide_db/src/symbol_index.rs[symbol_index.rs] |
297 | 279 | ||
298 | |||
299 | Uses fuzzy-search to find types, modules and functions by name across your | 280 | Uses fuzzy-search to find types, modules and functions by name across your |
300 | project and dependencies. This is **the** most useful feature, which improves code | 281 | project and dependencies. This is **the** most useful feature, which improves code |
301 | navigation tremendously. It mostly works on top of the built-in LSP | 282 | navigation tremendously. It mostly works on top of the built-in LSP |