Skip to content

Commit 7e3ee77

Browse files
committed
Tweak whitespace
1 parent 1c6a2eb commit 7e3ee77

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

docs/user/generated_features.adoc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
=== Expand Macro Recursively
22
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/expand_macro.rs[expand_macro.rs]
33

4-
54
Shows the full macro expansion of the macro at current cursor.
65

76
|===
@@ -14,7 +13,6 @@ Shows the full macro expansion of the macro at current cursor.
1413
=== Extend Selection
1514
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/extend_selection.rs[extend_selection.rs]
1615

17-
1816
Extends the current selection to the encompassing syntactic construct
1917
(expression, statement, item, module, etc). It works with multiple cursors.
2018

@@ -28,7 +26,6 @@ Extends the current selection to the encompassing syntactic construct
2826
=== File Structure
2927
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/display/structure.rs[structure.rs]
3028

31-
3229
Provides a tree of the symbols defined in the file. Can be used to
3330

3431
* 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
4542
=== Go to Definition
4643
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/goto_definition.rs[goto_definition.rs]
4744

48-
4945
Navigates to the definition of an identifier.
5046

5147
|===
@@ -58,7 +54,6 @@ Navigates to the definition of an identifier.
5854
=== Go to Implementation
5955
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/goto_implementation.rs[goto_implementation.rs]
6056

61-
6257
Navigates to the impl block of structs, enums or traits. Also implemented as a code lens.
6358

6459
|===
@@ -71,7 +66,6 @@ Navigates to the impl block of structs, enums or traits. Also implemented as a c
7166
=== Go to Type Definition
7267
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/goto_type_definition.rs[goto_type_definition.rs]
7368

74-
7569
Navigates to the type of an identifier.
7670

7771
|===
@@ -84,15 +78,13 @@ Navigates to the type of an identifier.
8478
=== Hover
8579
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/hover.rs[hover.rs]
8680

87-
8881
Shows additional information, like type of an expression or documentation for definition when "focusing" code.
8982
Focusing is usually hovering with a mouse, but can also be triggered with a shortcut.
9083

9184

9285
=== Inlay Hints
9386
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/inlay_hints.rs[inlay_hints.rs]
9487

95-
9688
rust-analyzer shows additional information inline with the source code.
9789
Editors usually render this using read-only virtual text snippets interspersed with code.
9890

@@ -116,7 +108,6 @@ https://github.com/rust-analyzer/rust-analyzer/issues/1623[1], https://github.co
116108
=== Join Lines
117109
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/join_lines.rs[join_lines.rs]
118110

119-
120111
Join selected lines into one, smartly fixing up whitespace, trailing commas, and braces.
121112

122113
|===
@@ -129,7 +120,6 @@ Join selected lines into one, smartly fixing up whitespace, trailing commas, and
129120
=== Magic Completions
130121
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/completion.rs[completion.rs]
131122

132-
133123
In addition to usual reference completion, rust-analyzer provides some ✨magic✨
134124
completions as well:
135125

@@ -175,7 +165,6 @@ mod tests {
175165
=== Matching Brace
176166
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/matching_brace.rs[matching_brace.rs]
177167

178-
179168
If the cursor is on any brace (`<>(){}[]`) which is a part of a brace-pair,
180169
moves cursor to the matching brace. It uses the actual parser to determine
181170
braces, so it won't confuse generics with comparisons.
@@ -190,7 +179,6 @@ braces, so it won't confuse generics with comparisons.
190179
=== On Typing Assists
191180
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/typing.rs[typing.rs]
192181

193-
194182
Some features trigger on typing certain characters:
195183

196184
- typing `let =` tries to smartly add `;` if `=` is followed by an existing expression
@@ -201,7 +189,6 @@ Some features trigger on typing certain characters:
201189
=== Parent Module
202190
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/parent_module.rs[parent_module.rs]
203191

204-
205192
Navigates to the parent module of the current module.
206193

207194
|===
@@ -214,7 +201,6 @@ Navigates to the parent module of the current module.
214201
=== Run
215202
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/runnables.rs[runnables.rs]
216203

217-
218204
Shows a popup suggesting to run a test/benchmark/binary **at the current cursor
219205
location**. Super useful for repeatedly running just a single test. Do bind this
220206
to a shortcut!
@@ -229,7 +215,6 @@ to a shortcut!
229215
=== Semantic Syntax Highlighting
230216
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/syntax_highlighting.rs[syntax_highlighting.rs]
231217

232-
233218
rust-analyzer highlights the code semantically.
234219
For example, `bar` in `foo::Bar` might be colored differently depending on whether `Bar` is an enum or a trait.
235220
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.
242227
=== Show Syntax Tree
243228
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/syntax_tree.rs[syntax_tree.rs]
244229

245-
246230
Shows the parse tree of the current file. It exists mostly for debugging
247231
rust-analyzer itself.
248232

@@ -256,7 +240,6 @@ rust-analyzer itself.
256240
=== Status
257241
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/status.rs[status.rs]
258242

259-
260243
Shows internal statistic about memory usage of rust-analyzer.
261244

262245
|===
@@ -269,7 +252,6 @@ Shows internal statistic about memory usage of rust-analyzer.
269252
=== Structural Seach and Replace
270253
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/ssr.rs[ssr.rs]
271254

272-
273255
Search and replace with named wildcards that will match any expression.
274256
The syntax for a structural search replace command is `<search_pattern> ==>> <replace_pattern>`.
275257
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))
295277
=== Workspace Symbol
296278
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide_db/src/symbol_index.rs[symbol_index.rs]
297279

298-
299280
Uses fuzzy-search to find types, modules and functions by name across your
300281
project and dependencies. This is **the** most useful feature, which improves code
301282
navigation tremendously. It mostly works on top of the built-in LSP

xtask/src/codegen/gen_feature_docs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::{
1010
pub fn generate_feature_docs(mode: Mode) -> Result<()> {
1111
let features = Feature::collect()?;
1212
let contents = features.into_iter().map(|it| it.to_string()).collect::<Vec<_>>().join("\n\n");
13-
13+
let contents = contents.trim().to_string() + "\n";
1414
let dst = project_root().join("docs/user/generated_features.adoc");
1515
codegen::update(&dst, &contents, mode)?;
1616
Ok(())
@@ -81,7 +81,7 @@ impl fmt::Display for Feature {
8181
name.to_str().unwrap(),
8282
)?;
8383

84-
writeln!(f, "\n{}", self.doc)?;
84+
writeln!(f, "{}", self.doc)?;
8585
Ok(())
8686
}
8787
}

0 commit comments

Comments
 (0)