From 13143e9d1a78c8e0135336bbfcc922ef28c0196a Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 30 Sep 2025 12:20:54 -0400 Subject: Handle java.apply.workspaceEdit --- lsp.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lsp.h') diff --git a/lsp.h b/lsp.h index 9ed1a47..a7fa9b0 100644 --- a/lsp.h +++ b/lsp.h @@ -575,8 +575,16 @@ typedef struct { LSPTextEdit *edits; } LSPResponseFormatting; +typedef enum { + LSP_COMMAND_NONE, + LSP_COMMAND_WORKSPACE_EDIT, +} LSPCommandKind; + typedef struct { - int type; + LSPCommandKind kind; + union { + LSPWorkspaceEdit edit; + } data; } LSPCommand; typedef enum { @@ -969,6 +977,7 @@ size_t json_escape_to(char *out, size_t out_sz, const char *in); char *json_escape(const char *str); LSPString lsp_response_add_json_string(LSPResponse *response, const JSON *json, JSONString string); LSPString lsp_request_add_json_string(LSPRequest *request, const JSON *json, JSONString string); +void lsp_workspace_edit_free(LSPWorkspaceEdit *edit); /// free resources used by lsp-write.c void lsp_write_quit(void); // convert JSON value back into string -- cgit v1.2.3