diff options
author | pommicket <pommicket@gmail.com> | 2022-12-26 20:41:43 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-26 20:41:43 -0500 |
commit | 9a5cad47fe6a8b84892f62e110ca887c95df5eff (patch) | |
tree | 48f5bcdf4d36d11716d233e98f52d1a9cb583143 /lsp-parse.c | |
parent | 44d607df5d5a9a1c892fe56c4874fbef7f209464 (diff) |
workspace/workspaceFolders request
Diffstat (limited to 'lsp-parse.c')
-rw-r--r-- | lsp-parse.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lsp-parse.c b/lsp-parse.c index de63401..6d436d9 100644 --- a/lsp-parse.c +++ b/lsp-parse.c @@ -370,6 +370,7 @@ static void process_message(LSP *lsp, JSON *json) { JSONValue result = json_get(json, "result"); if (result.type != JSON_UNDEFINED) { + // server-to-client response LSPResponse response = {0}; bool add_to_messages = false; response.request = response_to; @@ -405,7 +406,7 @@ static void process_message(LSP *lsp, JSON *json) { } if (add_to_messages) { SDL_LockMutex(lsp->messages_mutex); - LSPMessage *message = arr_addp(lsp->messages); + LSPMessage *message = arr_addp(lsp->messages_server2client); message->type = LSP_RESPONSE; message->u.response = response; SDL_UnlockMutex(lsp->messages_mutex); @@ -414,10 +415,11 @@ static void process_message(LSP *lsp, JSON *json) { lsp_response_free(&response); } } else if (json_has(json, "method")) { + // server-to-client request LSPRequest request = {0}; if (parse_server2client_request(lsp, json, &request)) { SDL_LockMutex(lsp->messages_mutex); - LSPMessage *message = arr_addp(lsp->messages); + LSPMessage *message = arr_addp(lsp->messages_server2client); message->type = LSP_REQUEST; message->u.request = request; SDL_UnlockMutex(lsp->messages_mutex); |