Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/lib.rs')
| -rw-r--r-- | crates/ide/src/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index 034a511793..121baa86f1 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs @@ -41,6 +41,7 @@ mod inlay_hints; mod join_lines; mod markdown_remove; mod matching_brace; +mod moniker; mod move_item; mod parent_module; mod references; @@ -83,6 +84,7 @@ pub use crate::{ inlay_hints::{InlayHint, InlayHintsConfig, InlayKind}, join_lines::JoinLinesConfig, markup::Markup, + moniker::{MonikerKind, MonikerResult, PackageInformation}, move_item::Direction, navigation_target::NavigationTarget, prime_caches::PrimeCachesProgress, @@ -225,6 +227,7 @@ impl Analysis { cfg_options, Env::default(), Default::default(), + Default::default(), ); change.change_file(file_id, Some(Arc::new(text))); change.set_crate_graph(crate_graph); @@ -425,6 +428,14 @@ impl Analysis { self.with_db(|db| hover::hover(db, range, config)) } + /// Returns moniker of symbol at position. + pub fn moniker( + &self, + position: FilePosition, + ) -> Cancellable<Option<RangeInfo<Vec<moniker::MonikerResult>>>> { + self.with_db(|db| moniker::moniker(db, position)) + } + /// Return URL(s) for the documentation of the symbol under the cursor. pub fn external_docs( &self, |