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