mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
for highlighting, search only the current file
This commit is contained in:
parent
6d186ec3be
commit
4529da906d
5 changed files with 112 additions and 29 deletions
|
@ -71,7 +71,7 @@ pub use crate::{
|
|||
inlay_hints::{InlayHint, InlayKind},
|
||||
line_index::{LineCol, LineIndex},
|
||||
line_index_utils::translate_offset_with_edit,
|
||||
references::ReferenceSearchResult,
|
||||
references::{ReferenceSearchResult, SearchScope},
|
||||
runnables::{Runnable, RunnableKind},
|
||||
syntax_highlighting::HighlightedRange,
|
||||
};
|
||||
|
@ -481,8 +481,9 @@ impl Analysis {
|
|||
pub fn find_all_refs(
|
||||
&self,
|
||||
position: FilePosition,
|
||||
search_scope: Option<SearchScope>,
|
||||
) -> Cancelable<Option<ReferenceSearchResult>> {
|
||||
self.with_db(|db| references::find_all_refs(db, position).map(|it| it.info))
|
||||
self.with_db(|db| references::find_all_refs(db, position, search_scope).map(|it| it.info))
|
||||
}
|
||||
|
||||
/// Returns a short text describing element at position.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue