mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Add new type HoverResult to contain the results of hovering
This makes testing hovers easier as well as allows us to do more things with the results if needed.
This commit is contained in:
parent
3ec2584148
commit
6f5fd6c9de
3 changed files with 149 additions and 16 deletions
|
@ -58,6 +58,7 @@ pub use crate::{
|
|||
navigation_target::NavigationTarget,
|
||||
references::ReferenceSearchResult,
|
||||
assists::{Assist, AssistId},
|
||||
hover::{HoverResult},
|
||||
};
|
||||
pub use ra_ide_api_light::{
|
||||
Fold, FoldKind, HighlightedRange, Severity, StructureNode, LocalEdit,
|
||||
|
@ -328,7 +329,7 @@ impl Analysis {
|
|||
}
|
||||
|
||||
/// Returns a short text describing element at position.
|
||||
pub fn hover(&self, position: FilePosition) -> Cancelable<Option<RangeInfo<String>>> {
|
||||
pub fn hover(&self, position: FilePosition) -> Cancelable<Option<RangeInfo<HoverResult>>> {
|
||||
self.with_db(|db| hover::hover(db, position))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue