From ff0a706a30567f297642ba1fa6ee9537ed82c40f Mon Sep 17 00:00:00 2001 From: "Jeremy A. Kolb" Date: Mon, 24 Sep 2018 09:52:33 -0400 Subject: Split folding ranges into editor and lsp parts --- crates/ra_analysis/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/ra_analysis') 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}; pub use ra_editor::{ StructureNode, LineIndex, FileSymbol, Runnable, RunnableKind, HighlightedRange, CompletionItem, + Fold, FoldKind }; pub use job::{JobToken, JobHandle}; @@ -224,6 +225,10 @@ impl Analysis { pub fn diagnostics(&self, file_id: FileId) -> Vec { self.imp.diagnostics(file_id) } + pub fn folding_ranges(&self, file_id: FileId) -> Vec { + let file = self.imp.file_syntax(file_id); + ra_editor::folding_ranges(&file) + } } #[derive(Debug)] -- cgit v1.2.3