From 1f9cd2a40d72d7982e8a9ff93e5ad432e14accc3 Mon Sep 17 00:00:00 2001 From: pommicket Date: Thu, 29 Dec 2022 10:52:41 -0500 Subject: fix autocomplete, start hover --- lsp-write.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lsp-write.c') diff --git a/lsp-write.c b/lsp-write.c index 4c9bce3..dce4c22 100644 --- a/lsp-write.c +++ b/lsp-write.c @@ -265,6 +265,8 @@ static const char *lsp_request_method(LSPRequest *request) { return "textDocument/completion"; case LSP_REQUEST_SIGNATURE_HELP: return "textDocument/signatureHelp"; + case LSP_REQUEST_HOVER: + return "textDocument/hover"; case LSP_REQUEST_WORKSPACE_FOLDERS: return "workspace/workspaceFolders"; case LSP_REQUEST_DID_CHANGE_WORKSPACE_FOLDERS: @@ -293,6 +295,7 @@ static bool request_type_is_notification(LSPRequestType type) { case LSP_REQUEST_LOG_MESSAGE: case LSP_REQUEST_COMPLETION: case LSP_REQUEST_SIGNATURE_HELP: + case LSP_REQUEST_HOVER: case LSP_REQUEST_WORKSPACE_FOLDERS: return false; } @@ -494,6 +497,12 @@ static void write_request(LSP *lsp, LSPRequest *request) { write_document_position(o, help->position); write_obj_end(o); } break; + case LSP_REQUEST_HOVER: { + const LSPRequestHover *hover = &request->data.hover; + write_key_obj_start(o, "params"); + write_document_position(o, hover->position); + write_obj_end(o); + } break; case LSP_REQUEST_DID_CHANGE_WORKSPACE_FOLDERS: { const LSPRequestDidChangeWorkspaceFolders *w = &request->data.change_workspace_folders; write_key_obj_start(o, "params"); -- cgit v1.2.3