diff options
author | Aleksey Kladov <[email protected]> | 2020-05-31 00:54:54 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-31 00:54:54 +0100 |
commit | c8f27a4a886413a15a2a6af4a87b39b901c873a8 (patch) | |
tree | ae4f7c31fa30581ef09b3c29d2673dee922e5845 /crates/ra_ide/src/display/structure.rs | |
parent | 383247a9ae8202f20ce6f01d1429c1cd2a11d516 (diff) |
Generate features docs from source
Diffstat (limited to 'crates/ra_ide/src/display/structure.rs')
-rw-r--r-- | crates/ra_ide/src/display/structure.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ra_ide/src/display/structure.rs b/crates/ra_ide/src/display/structure.rs index 967eee5d2..3f59b89bb 100644 --- a/crates/ra_ide/src/display/structure.rs +++ b/crates/ra_ide/src/display/structure.rs | |||
@@ -18,6 +18,19 @@ pub struct StructureNode { | |||
18 | pub deprecated: bool, | 18 | pub deprecated: bool, |
19 | } | 19 | } |
20 | 20 | ||
21 | // Feature: File Structure | ||
22 | // | ||
23 | // Provides a tree of the symbols defined in the file. Can be used to | ||
24 | // | ||
25 | // * fuzzy search symbol in a file (super useful) | ||
26 | // * draw breadcrumbs to describe the context around the cursor | ||
27 | // * draw outline of the file | ||
28 | // | ||
29 | // |=== | ||
30 | // | Editor | Shortcut | ||
31 | // | ||
32 | // | VS Code | kbd:[Ctrl+Shift+O] | ||
33 | // |=== | ||
21 | pub fn file_structure(file: &SourceFile) -> Vec<StructureNode> { | 34 | pub fn file_structure(file: &SourceFile) -> Vec<StructureNode> { |
22 | let mut res = Vec::new(); | 35 | let mut res = Vec::new(); |
23 | let mut stack = Vec::new(); | 36 | let mut stack = Vec::new(); |