feat: add depended_{paths,{source_,}files} methods (#1150)

This commit is contained in:
Myriad-Dreamin 2025-01-11 17:44:23 +08:00 committed by GitHub
parent ec121070d8
commit f43a8e116c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 42 additions and 17 deletions

View file

@ -82,7 +82,7 @@ impl ReferencesWorker<'_> {
fn label_root(mut self) -> Option<Vec<LspLocation>> {
let mut ids = vec![];
for dep in self.ctx.ctx.dependencies() {
for dep in self.ctx.ctx.depended_paths() {
if let Ok(ref_fid) = self.ctx.ctx.file_id_by_path(&dep) {
ids.push(ref_fid);
}