diff options
Diffstat (limited to 'crates/ide/src/lib.rs')
-rw-r--r-- | crates/ide/src/lib.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index d1a250d48..662da5a96 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs | |||
@@ -71,7 +71,7 @@ pub use crate::{ | |||
71 | diagnostics::{Diagnostic, DiagnosticsConfig, Fix, Severity}, | 71 | diagnostics::{Diagnostic, DiagnosticsConfig, Fix, Severity}, |
72 | display::navigation_target::NavigationTarget, | 72 | display::navigation_target::NavigationTarget, |
73 | expand_macro::ExpandedMacro, | 73 | expand_macro::ExpandedMacro, |
74 | file_structure::StructureNode, | 74 | file_structure::{StructureNode, StructureNodeKind}, |
75 | folding_ranges::{Fold, FoldKind}, | 75 | folding_ranges::{Fold, FoldKind}, |
76 | hover::{HoverAction, HoverConfig, HoverGotoTypeData, HoverResult}, | 76 | hover::{HoverAction, HoverConfig, HoverGotoTypeData, HoverResult}, |
77 | inlay_hints::{InlayHint, InlayHintsConfig, InlayKind}, | 77 | inlay_hints::{InlayHint, InlayHintsConfig, InlayKind}, |
@@ -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::{ |
@@ -101,7 +101,7 @@ pub use ide_db::{ | |||
101 | search::{ReferenceAccess, SearchScope}, | 101 | search::{ReferenceAccess, SearchScope}, |
102 | source_change::{FileSystemEdit, SourceChange}, | 102 | source_change::{FileSystemEdit, SourceChange}, |
103 | symbol_index::Query, | 103 | symbol_index::Query, |
104 | RootDatabase, | 104 | RootDatabase, SymbolKind, |
105 | }; | 105 | }; |
106 | pub use ide_ssr::SsrError; | 106 | pub use ide_ssr::SsrError; |
107 | pub use syntax::{TextRange, TextSize}; | 107 | pub use syntax::{TextRange, TextSize}; |
@@ -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)) |