mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
move index_resolve to symbol index
This commit is contained in:
parent
5173c6295b
commit
e4a6343e47
4 changed files with 11 additions and 14 deletions
|
@ -109,6 +109,14 @@ pub(crate) fn world_symbols(db: &RootDatabase, query: Query) -> Vec<FileSymbol>
|
|||
query.search(&buf)
|
||||
}
|
||||
|
||||
pub(crate) fn index_resolve(db: &RootDatabase, name_ref: &ast::NameRef) -> Vec<FileSymbol> {
|
||||
let name = name_ref.text();
|
||||
let mut query = Query::new(name.to_string());
|
||||
query.exact();
|
||||
query.limit(4);
|
||||
crate::symbol_index::world_symbols(db, query)
|
||||
}
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub(crate) struct SymbolIndex {
|
||||
symbols: Vec<FileSymbol>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue