mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
restore symbols filtering
This commit is contained in:
parent
d190019571
commit
363adf07b7
1 changed files with 8 additions and 5 deletions
|
@ -181,12 +181,15 @@ impl AnalysisImpl {
|
|||
}
|
||||
pub fn world_symbols(&self, query: Query) -> Cancelable<Vec<(FileId, FileSymbol)>> {
|
||||
let mut buf = Vec::new();
|
||||
if query.libs {
|
||||
for &lib_id in self.db.libraries().iter() {
|
||||
buf.push(self.db.library_symbols(lib_id));
|
||||
}
|
||||
} else {
|
||||
for &file_id in self.db.source_root(WORKSPACE).files.iter() {
|
||||
buf.push(self.db.file_symbols(file_id)?);
|
||||
}
|
||||
}
|
||||
Ok(query.search(&buf))
|
||||
}
|
||||
fn module_tree(&self, file_id: FileId) -> Cancelable<Arc<ModuleTree>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue