diff options
author | pommicket <pommicket@gmail.com> | 2022-12-30 15:27:38 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-30 15:27:38 -0500 |
commit | d51f4ce90fc40bb6b1813e7716d1db40cf91ee15 (patch) | |
tree | dbd72d0add72d4923244e93e476deeb422b0ff99 /lsp-write.c | |
parent | 547bfbba7a1ef84d397711882a501fc4914addba (diff) |
cancelling requests
Diffstat (limited to 'lsp-write.c')
-rw-r--r-- | lsp-write.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lsp-write.c b/lsp-write.c index b8167b4..e5e0d09 100644 --- a/lsp-write.c +++ b/lsp-write.c @@ -253,6 +253,8 @@ static const char *lsp_request_method(LSPRequest *request) { return "shutdown"; case LSP_REQUEST_EXIT: return "exit"; + case LSP_REQUEST_CANCEL: + return "$/cancelRequest"; case LSP_REQUEST_SHOW_MESSAGE: return "window/showMessage"; case LSP_REQUEST_LOG_MESSAGE: @@ -451,6 +453,12 @@ static void write_request(LSP *lsp, LSPRequest *request) { write_obj_end(o); write_obj_end(o); } break; + case LSP_REQUEST_CANCEL: { + const LSPRequestCancel *cancel = &request->data.cancel; + write_key_obj_start(o, "params"); + write_key_number(o, "id", cancel->id); + write_obj_end(o); + } break; case LSP_REQUEST_DID_OPEN: { const LSPRequestDidOpen *open = &request->data.open; write_key_obj_start(o, "params"); |