use base_db::{ deps::{self, EdgeData}, DocumentLocation, FeatureParams, }; pub(super) fn find_links<'a>( params: &FeatureParams<'a>, results: &mut Vec>, ) -> Option<()> { let document = params.document; let parent = *deps::parents(params.workspace, document) .iter() .next() .unwrap_or(&document); let graph = ¶ms.workspace.graphs()[&parent.uri]; for edge in &graph.edges { if edge.source == document.uri { if let EdgeData::DirectLink(data) = &edge.data { let target = params.workspace.lookup(&edge.target).unwrap(); results.push(DocumentLocation::new(target, data.link.path.range)); } } } Some(()) }