aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-09-25 12:43:48 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-09-25 12:43:48 +0100
commit7eb047a105ee42b5dbd8f5cf7d956ca7bdfd551a (patch)
tree7edf00b8f1e7416b364127c31dafe02df1685587 /crates/ra_analysis
parentc2ab6ad73d2a7cd9a54dd8ee9f96dab25ec89600 (diff)
parent4d52d004d58ff8d0479220d22bd0adfcfd7ffa9f (diff)
Merge #79
79: Implement Folding Ranges r=matklad a=kjeremy Implements folding ranges for comments and imports. Bumps LSP to 3.13 Co-authored-by: Jeremy A. Kolb <[email protected]>
Diffstat (limited to 'crates/ra_analysis')
-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)]