diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-22 13:57:07 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-22 13:57:07 +0000 |
commit | 6e324d38d6ef3e250ff32a397f4777699e006f7f (patch) | |
tree | 4e8fad4c4e8042c0c30c3117d62bb8c765444f99 /crates/ra_ide_api/src/lib.rs | |
parent | 708a7d24c5bfa3fd87d9b3b762d71c2a9916c6e1 (diff) | |
parent | 47c501bcfbd24356009d1db5b4dbe2e27a148d9a (diff) |
Merge #1016
1016: Move folding_ranges to ra_ide_api r=pasa a=pasa
folding_ranges part of #1009
Co-authored-by: Sergey Parilin <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/lib.rs')
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index 35f38fbb7..d6f63490d 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -34,6 +34,7 @@ mod assists; | |||
34 | mod diagnostics; | 34 | mod diagnostics; |
35 | mod syntax_tree; | 35 | mod syntax_tree; |
36 | mod line_index; | 36 | mod line_index; |
37 | mod folding_ranges; | ||
37 | mod line_index_utils; | 38 | mod line_index_utils; |
38 | 39 | ||
39 | #[cfg(test)] | 40 | #[cfg(test)] |
@@ -64,9 +65,10 @@ pub use crate::{ | |||
64 | hover::{HoverResult}, | 65 | hover::{HoverResult}, |
65 | line_index::{LineIndex, LineCol}, | 66 | line_index::{LineIndex, LineCol}, |
66 | line_index_utils::translate_offset_with_edit, | 67 | line_index_utils::translate_offset_with_edit, |
68 | folding_ranges::{Fold, FoldKind}, | ||
67 | }; | 69 | }; |
68 | pub use ra_ide_api_light::{ | 70 | pub use ra_ide_api_light::{ |
69 | Fold, FoldKind, HighlightedRange, Severity, StructureNode, LocalEdit, | 71 | HighlightedRange, Severity, StructureNode, LocalEdit, |
70 | }; | 72 | }; |
71 | pub use ra_db::{ | 73 | pub use ra_db::{ |
72 | Canceled, CrateGraph, CrateId, FileId, FilePosition, FileRange, SourceRootId, | 74 | Canceled, CrateGraph, CrateId, FileId, FilePosition, FileRange, SourceRootId, |
@@ -314,7 +316,7 @@ impl Analysis { | |||
314 | /// Returns the set of folding ranges. | 316 | /// Returns the set of folding ranges. |
315 | pub fn folding_ranges(&self, file_id: FileId) -> Vec<Fold> { | 317 | pub fn folding_ranges(&self, file_id: FileId) -> Vec<Fold> { |
316 | let file = self.db.parse(file_id); | 318 | let file = self.db.parse(file_id); |
317 | ra_ide_api_light::folding_ranges(&file) | 319 | folding_ranges::folding_ranges(&file) |
318 | } | 320 | } |
319 | 321 | ||
320 | /// Fuzzy searches for a symbol. | 322 | /// Fuzzy searches for a symbol. |