aboutsummaryrefslogtreecommitdiff
path: root/docs/user/generated_features.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user/generated_features.adoc')
-rw-r--r--docs/user/generated_features.adoc38
1 files changed, 19 insertions, 19 deletions
diff --git a/docs/user/generated_features.adoc b/docs/user/generated_features.adoc
index 803073d55..12812fa0b 100644
--- a/docs/user/generated_features.adoc
+++ b/docs/user/generated_features.adoc
@@ -1,5 +1,5 @@
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#L15[expand_macro.rs]
3 3
4Shows the full macro expansion of the macro at current cursor. 4Shows the full macro expansion of the macro at current cursor.
5 5
@@ -11,7 +11,7 @@ Shows the full macro expansion of the macro at current cursor.
11 11
12 12
13=== Extend Selection 13=== Extend Selection
14**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#L15[extend_selection.rs]
15 15
16Extends the current selection to the encompassing syntactic construct 16Extends the current selection to the encompassing syntactic construct
17(expression, statement, item, module, etc). It works with multiple cursors. 17(expression, statement, item, module, etc). It works with multiple cursors.
@@ -24,7 +24,7 @@ Extends the current selection to the encompassing syntactic construct
24 24
25 25
26=== File Structure 26=== File Structure
27**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#L17[structure.rs]
28 28
29Provides a tree of the symbols defined in the file. Can be used to 29Provides a tree of the symbols defined in the file. Can be used to
30 30
@@ -40,7 +40,7 @@ Provides a tree of the symbols defined in the file. Can be used to
40 40
41 41
42=== Go to Definition 42=== Go to Definition
43**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#L18[goto_definition.rs]
44 44
45Navigates to the definition of an identifier. 45Navigates to the definition of an identifier.
46 46
@@ -52,7 +52,7 @@ Navigates to the definition of an identifier.
52 52
53 53
54=== Go to Implementation 54=== Go to Implementation
55**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#L7[goto_implementation.rs]
56 56
57Navigates to the impl block of structs, enums or traits. Also implemented as a code lens. 57Navigates to the impl block of structs, enums or traits. Also implemented as a code lens.
58 58
@@ -64,7 +64,7 @@ Navigates to the impl block of structs, enums or traits. Also implemented as a c
64 64
65 65
66=== Go to Type Definition 66=== Go to Type Definition
67**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#L6[goto_type_definition.rs]
68 68
69Navigates to the type of an identifier. 69Navigates to the type of an identifier.
70 70
@@ -76,14 +76,14 @@ Navigates to the type of an identifier.
76 76
77 77
78=== Hover 78=== Hover
79**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#L63[hover.rs]
80 80
81Shows additional information, like type of an expression or documentation for definition when "focusing" code. 81Shows additional information, like type of an expression or documentation for definition when "focusing" code.
82Focusing is usually hovering with a mouse, but can also be triggered with a shortcut. 82Focusing is usually hovering with a mouse, but can also be triggered with a shortcut.
83 83
84 84
85=== Inlay Hints 85=== Inlay Hints
86**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#L40[inlay_hints.rs]
87 87
88rust-analyzer shows additional information inline with the source code. 88rust-analyzer shows additional information inline with the source code.
89Editors usually render this using read-only virtual text snippets interspersed with code. 89Editors usually render this using read-only virtual text snippets interspersed with code.
@@ -106,7 +106,7 @@ https://github.com/rust-analyzer/rust-analyzer/issues/1623[1], https://github.co
106 106
107 107
108=== Join Lines 108=== Join Lines
109**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#L12[join_lines.rs]
110 110
111Join selected lines into one, smartly fixing up whitespace, trailing commas, and braces. 111Join selected lines into one, smartly fixing up whitespace, trailing commas, and braces.
112 112
@@ -118,7 +118,7 @@ Join selected lines into one, smartly fixing up whitespace, trailing commas, and
118 118
119 119
120=== Magic Completions 120=== Magic Completions
121**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#L38[completion.rs]
122 122
123In addition to usual reference completion, rust-analyzer provides some ✨magic✨ 123In addition to usual reference completion, rust-analyzer provides some ✨magic✨
124completions as well: 124completions as well:
@@ -163,7 +163,7 @@ mod tests {
163 163
164 164
165=== Matching Brace 165=== Matching Brace
166**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#L3[matching_brace.rs]
167 167
168If the cursor is on any brace (`<>(){}[]`) which is a part of a brace-pair, 168If the cursor is on any brace (`<>(){}[]`) which is a part of a brace-pair,
169moves cursor to the matching brace. It uses the actual parser to determine 169moves cursor to the matching brace. It uses the actual parser to determine
@@ -177,7 +177,7 @@ braces, so it won't confuse generics with comparisons.
177 177
178 178
179=== On Typing Assists 179=== On Typing Assists
180**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#L35[typing.rs]
181 181
182Some features trigger on typing certain characters: 182Some features trigger on typing certain characters:
183 183
@@ -187,7 +187,7 @@ Some features trigger on typing certain characters:
187 187
188 188
189=== Parent Module 189=== Parent Module
190**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#L12[parent_module.rs]
191 191
192Navigates to the parent module of the current module. 192Navigates to the parent module of the current module.
193 193
@@ -199,7 +199,7 @@ Navigates to the parent module of the current module.
199 199
200 200
201=== Run 201=== Run
202**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#L45[runnables.rs]
203 203
204Shows a popup suggesting to run a test/benchmark/binary **at the current cursor 204Shows a popup suggesting to run a test/benchmark/binary **at the current cursor
205location**. Super useful for repeatedly running just a single test. Do bind this 205location**. Super useful for repeatedly running just a single test. Do bind this
@@ -213,7 +213,7 @@ to a shortcut!
213 213
214 214
215=== Semantic Syntax Highlighting 215=== Semantic Syntax Highlighting
216**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#L33[syntax_highlighting.rs]
217 217
218rust-analyzer highlights the code semantically. 218rust-analyzer highlights the code semantically.
219For example, `bar` in `foo::Bar` might be colored differently depending on whether `Bar` is an enum or a trait. 219For example, `bar` in `foo::Bar` might be colored differently depending on whether `Bar` is an enum or a trait.
@@ -225,7 +225,7 @@ We also give special modifier for `mut` and `&mut` local variables.
225 225
226 226
227=== Show Syntax Tree 227=== Show Syntax Tree
228**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#L9[syntax_tree.rs]
229 229
230Shows the parse tree of the current file. It exists mostly for debugging 230Shows the parse tree of the current file. It exists mostly for debugging
231rust-analyzer itself. 231rust-analyzer itself.
@@ -238,7 +238,7 @@ rust-analyzer itself.
238 238
239 239
240=== Status 240=== Status
241**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#L27[status.rs]
242 242
243Shows internal statistic about memory usage of rust-analyzer. 243Shows internal statistic about memory usage of rust-analyzer.
244 244
@@ -250,7 +250,7 @@ Shows internal statistic about memory usage of rust-analyzer.
250 250
251 251
252=== Structural Seach and Replace 252=== Structural Seach and Replace
253**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#L26[ssr.rs]
254 254
255Search and replace with named wildcards that will match any expression. 255Search and replace with named wildcards that will match any expression.
256The syntax for a structural search replace command is `<search_pattern> ==>> <replace_pattern>`. 256The syntax for a structural search replace command is `<search_pattern> ==>> <replace_pattern>`.
@@ -275,7 +275,7 @@ String::from((y + 5).foo(z))
275 275
276 276
277=== Workspace Symbol 277=== Workspace Symbol
278**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#L113[symbol_index.rs]
279 279
280Uses fuzzy-search to find types, modules and functions by name across your 280Uses fuzzy-search to find types, modules and functions by name across your
281project and dependencies. This is **the** most useful feature, which improves code 281project and dependencies. This is **the** most useful feature, which improves code