mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Emit moniker in lsif
This commit is contained in:
parent
a07e406d06
commit
30ed7fac27
12 changed files with 589 additions and 18 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue