feat: Completed the client side implementation of rust-analyzer/hoverRange

This commit is contained in:
Alexander Gonzalez
2021-07-25 17:26:54 -04:00
parent 8ca3bb8fcd
commit 18644720eb
7 changed files with 129 additions and 30 deletions

View File

@@ -376,14 +376,22 @@ pub struct SnippetTextEdit {
pub enum HoverRequest {}
impl Request for HoverRequest {
type Params = HoverParams;
type Params = lsp_types::HoverParams;
type Result = Option<Hover>;
const METHOD: &'static str = "textDocument/hover";
}
pub enum HoverRangeRequest {}
impl Request for HoverRangeRequest {
type Params = HoverRangeParams;
type Result = Option<Hover>;
const METHOD: &'static str = "rust-analyzer/hoverRange";
}
#[derive(Deserialize, Serialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct HoverParams {
pub struct HoverRangeParams {
pub text_document: TextDocumentIdentifier,
pub range: Range,
}