summaryrefslogtreecommitdiff
path: root/lsp-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'lsp-write.c')
-rw-r--r--lsp-write.c8
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");