aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src
diff options
context:
space:
mode:
authorJeremy A. Kolb <[email protected]>2018-09-24 14:52:33 +0100
committerJeremy A. Kolb <[email protected]>2018-09-24 14:52:33 +0100
commitff0a706a30567f297642ba1fa6ee9537ed82c40f (patch)
tree7bb8c79853cf24da27a66c2c891529bcd46d8cdf /crates/ra_analysis/src
parentbd2b2f1b48f86d59c3b746b72a14192f75419a84 (diff)
Split folding ranges into editor and lsp parts
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r--crates/ra_analysis/src/lib.rs5
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};
34pub use ra_editor::{ 34pub 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};
38pub use job::{JobToken, JobHandle}; 39pub 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)]