diff options
author | Jeremy A. Kolb <[email protected]> | 2018-09-24 14:52:33 +0100 |
---|---|---|
committer | Jeremy A. Kolb <[email protected]> | 2018-09-24 14:52:33 +0100 |
commit | ff0a706a30567f297642ba1fa6ee9537ed82c40f (patch) | |
tree | 7bb8c79853cf24da27a66c2c891529bcd46d8cdf /crates/ra_analysis | |
parent | bd2b2f1b48f86d59c3b746b72a14192f75419a84 (diff) |
Split folding ranges into editor and lsp parts
Diffstat (limited to 'crates/ra_analysis')
-rw-r--r-- | crates/ra_analysis/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs index 4da55ab26..b4c7db476 100644 --- a/crates/ra_analysis/src/lib.rs +++ b/crates/ra_analysis/src/lib.rs | |||
@@ -34,6 +34,7 @@ use imp::{AnalysisImpl, AnalysisHostImpl, FileResolverImp}; | |||
34 | pub use ra_editor::{ | 34 | pub use ra_editor::{ |
35 | StructureNode, LineIndex, FileSymbol, | 35 | StructureNode, LineIndex, FileSymbol, |
36 | Runnable, RunnableKind, HighlightedRange, CompletionItem, | 36 | Runnable, RunnableKind, HighlightedRange, CompletionItem, |
37 | Fold, FoldKind | ||
37 | }; | 38 | }; |
38 | pub use job::{JobToken, JobHandle}; | 39 | pub use job::{JobToken, JobHandle}; |
39 | 40 | ||
@@ -224,6 +225,10 @@ impl Analysis { | |||
224 | pub fn diagnostics(&self, file_id: FileId) -> Vec<Diagnostic> { | 225 | pub fn diagnostics(&self, file_id: FileId) -> Vec<Diagnostic> { |
225 | self.imp.diagnostics(file_id) | 226 | self.imp.diagnostics(file_id) |
226 | } | 227 | } |
228 | pub fn folding_ranges(&self, file_id: FileId) -> Vec<Fold> { | ||
229 | let file = self.imp.file_syntax(file_id); | ||
230 | ra_editor::folding_ranges(&file) | ||
231 | } | ||
227 | } | 232 | } |
228 | 233 | ||
229 | #[derive(Debug)] | 234 | #[derive(Debug)] |