Add hover

This commit is contained in:
Ayaz Hafiz 2022-08-20 16:24:11 -05:00
parent 9d365a8a57
commit 0db1cd9c28
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
6 changed files with 193 additions and 19 deletions

View file

@ -100,6 +100,20 @@ impl LanguageServer for RocLs {
async fn shutdown(&self) -> Result<()> {
Ok(())
}
async fn hover(&self, params: HoverParams) -> Result<Option<Hover>> {
let HoverParams {
text_document_position_params:
TextDocumentPositionParams {
text_document,
position,
},
work_done_progress_params: _,
} = params;
let hover = self.registry().hover(&text_document.uri, position);
Ok(hover)
}
}
#[tokio::main]