mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Moved CodeLens to ide crate
This commit is contained in:
parent
935830d05b
commit
185da286d2
7 changed files with 388 additions and 202 deletions
|
@ -22,6 +22,7 @@ mod markup;
|
|||
mod prime_caches;
|
||||
mod display;
|
||||
|
||||
mod annotations;
|
||||
mod call_hierarchy;
|
||||
mod diagnostics;
|
||||
mod expand_macro;
|
||||
|
@ -63,6 +64,7 @@ use syntax::SourceFile;
|
|||
use crate::display::ToNav;
|
||||
|
||||
pub use crate::{
|
||||
annotations::{Annotation, AnnotationConfig, AnnotationKind},
|
||||
call_hierarchy::CallItem,
|
||||
diagnostics::{Diagnostic, DiagnosticsConfig, Fix, Severity},
|
||||
display::navigation_target::NavigationTarget,
|
||||
|
@ -555,6 +557,18 @@ impl Analysis {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn annotations(
|
||||
&self,
|
||||
file_id: FileId,
|
||||
config: AnnotationConfig,
|
||||
) -> Cancelable<Vec<Annotation>> {
|
||||
self.with_db(|db| annotations::annotations(db, file_id, config))
|
||||
}
|
||||
|
||||
pub fn resolve_annotation(&self, annotation: Annotation) -> Cancelable<Annotation> {
|
||||
self.with_db(|db| annotations::resolve_annotation(db, annotation))
|
||||
}
|
||||
|
||||
/// Performs an operation on that may be Canceled.
|
||||
fn with_db<F, T>(&self, f: F) -> Cancelable<T>
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue