feat: Extend the server with the hover_range capability

This commit is contained in:
Alexander Gonzalez
2021-07-22 22:08:28 -04:00
parent 6a2a0b7abb
commit 20c64cc0e6
4 changed files with 44 additions and 6 deletions

View File

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