diff options
author | pommicket <pommicket@gmail.com> | 2022-12-29 10:52:41 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-29 10:52:41 -0500 |
commit | 1f9cd2a40d72d7982e8a9ff93e5ad432e14accc3 (patch) | |
tree | d307d716014ba0bf336fe338f7fd981bade5e6fb /lsp-write.c | |
parent | 143387f72d255613ab774daaeaeebdd31fa16256 (diff) |
fix autocomplete, start hover
Diffstat (limited to 'lsp-write.c')
-rw-r--r-- | lsp-write.c | 9 |
1 files changed, 9 insertions, 0 deletions
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"); |