mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Add hover
This commit is contained in:
parent
9d365a8a57
commit
0db1cd9c28
6 changed files with 193 additions and 19 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue