We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b30d9c commit 04e3869Copy full SHA for 04e3869
crates/rust-analyzer/src/handlers.rs
@@ -873,8 +873,6 @@ pub(crate) fn handle_hover(
873
params: lsp_ext::HoverParams,
874
) -> Result<Option<lsp_ext::Hover>> {
875
let _p = profile::span("handle_hover");
876
- let file_id = from_proto::file_id(&snap, ¶ms.text_document.uri)?;
877
-
878
let range = match params.position {
879
PositionOrRange::Position(position) => Range::new(position, position),
880
PositionOrRange::Range(range) => range,
@@ -886,7 +884,7 @@ pub(crate) fn handle_hover(
886
884
Some(info) => info,
887
885
};
888
889
- let line_index = snap.file_line_index(file_id)?;
+ let line_index = snap.file_line_index(file_range.file_id)?;
890
let range = to_proto::range(&line_index, info.range);
891
let hover = lsp_ext::Hover {
892
hover: lsp_types::Hover {
0 commit comments