diff options
Diffstat (limited to 'crates/ide/src/lib.rs')
-rw-r--r-- | crates/ide/src/lib.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index d1a250d48..a8b169e87 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs | |||
@@ -87,7 +87,7 @@ pub use crate::{ | |||
87 | pub use hir::{Documentation, Semantics}; | 87 | pub use hir::{Documentation, Semantics}; |
88 | pub use ide_assists::{Assist, AssistConfig, AssistId, AssistKind}; | 88 | pub use ide_assists::{Assist, AssistConfig, AssistId, AssistKind}; |
89 | pub use ide_completion::{ | 89 | pub use ide_completion::{ |
90 | CompletionConfig, CompletionItem, CompletionItemKind, CompletionScore, ImportEdit, | 90 | CompletionConfig, CompletionItem, CompletionItemKind, CompletionRelevance, ImportEdit, |
91 | InsertTextFormat, | 91 | InsertTextFormat, |
92 | }; | 92 | }; |
93 | pub use ide_db::{ | 93 | pub use ide_db::{ |
@@ -447,6 +447,15 @@ impl Analysis { | |||
447 | self.with_db(|db| runnables::runnables(db, file_id)) | 447 | self.with_db(|db| runnables::runnables(db, file_id)) |
448 | } | 448 | } |
449 | 449 | ||
450 | /// Returns the set of tests for the given file position. | ||
451 | pub fn related_tests( | ||
452 | &self, | ||
453 | position: FilePosition, | ||
454 | search_scope: Option<SearchScope>, | ||
455 | ) -> Cancelable<Vec<Runnable>> { | ||
456 | self.with_db(|db| runnables::related_tests(db, position, search_scope)) | ||
457 | } | ||
458 | |||
450 | /// Computes syntax highlighting for the given file | 459 | /// Computes syntax highlighting for the given file |
451 | pub fn highlight(&self, file_id: FileId) -> Cancelable<Vec<HlRange>> { | 460 | pub fn highlight(&self, file_id: FileId) -> Cancelable<Vec<HlRange>> { |
452 | self.with_db(|db| syntax_highlighting::highlight(db, file_id, None, false)) | 461 | self.with_db(|db| syntax_highlighting::highlight(db, file_id, None, false)) |