Prepare editor to display multiple LSP hover responses for the same place (#9868)

This commit is contained in:
Kirill Bulatov 2024-03-27 20:49:26 +01:00 committed by GitHub
parent ce37885f49
commit 80242584e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 163 additions and 106 deletions

View file

@ -4978,11 +4978,16 @@ async fn test_lsp_hover(
},
);
let hover_info = project_b
let hovers = project_b
.update(cx_b, |p, cx| p.hover(&buffer_b, 22, cx))
.await
.unwrap()
.unwrap();
assert_eq!(
hovers.len(),
1,
"Expected exactly one hover but got: {hovers:?}"
);
let hover_info = hovers.into_iter().next().unwrap();
buffer_b.read_with(cx_b, |buffer, _| {
let snapshot = buffer.snapshot();