diff options
Diffstat (limited to 'crates/ra_lsp_server/src/conv.rs')
-rw-r--r-- | crates/ra_lsp_server/src/conv.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index d0bdc94aa..82c7e757f 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs | |||
@@ -421,7 +421,15 @@ impl TryConvWith for (FileId, RangeInfo<Vec<NavigationTarget>>) { | |||
421 | .into_iter() | 421 | .into_iter() |
422 | .map(|nav| (file_id, RangeInfo::new(range, nav))) | 422 | .map(|nav| (file_id, RangeInfo::new(range, nav))) |
423 | .try_conv_with_to_vec(world)?; | 423 | .try_conv_with_to_vec(world)?; |
424 | Ok(links.into()) | 424 | if world.options.supports_location_link { |
425 | Ok(links.into()) | ||
426 | } else { | ||
427 | let locations: Vec<Location> = links | ||
428 | .into_iter() | ||
429 | .map(|link| Location { uri: link.target_uri, range: link.target_selection_range }) | ||
430 | .collect(); | ||
431 | Ok(locations.into()) | ||
432 | } | ||
425 | } | 433 | } |
426 | } | 434 | } |
427 | 435 | ||