From 4529da906db7f18aaf384c079332e4ea12c82d55 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 24 Oct 2019 14:01:02 +0300 Subject: for highlighting, search only the current file --- crates/ra_ide_api/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide_api/src/lib.rs') diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index 19669a7f0..0832229fd 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs @@ -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, ) -> Cancelable> { - 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. -- cgit v1.2.3