diff options
author | pommicket <pommicket@gmail.com> | 2022-12-30 10:17:42 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-30 10:17:42 -0500 |
commit | 61db5a1a07f4fbe953d7cab9b6714fe5157a1265 (patch) | |
tree | b06e2590429dcd108bcd00182fbb09cd250a0d38 /lsp-write.c | |
parent | a0f8332da674d452f7ae4f84f01d4682d464c9b2 (diff) |
start workspace/symbol
Diffstat (limited to 'lsp-write.c')
-rw-r--r-- | lsp-write.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lsp-write.c b/lsp-write.c index 82ba5b4..4068479 100644 --- a/lsp-write.c +++ b/lsp-write.c @@ -277,13 +277,13 @@ static const char *lsp_request_method(LSPRequest *request) { return "workspace/didChangeWorkspaceFolders"; case LSP_REQUEST_JDTLS_CONFIGURATION: return "workspace/didChangeConfiguration"; + case LSP_REQUEST_WORKSPACE_SYMBOLS: + return "workspace/symbol"; } assert(0); return "$/ignore"; } - - static const size_t max_header_size = 64; static JSONWriter message_writer_new(LSP *lsp) { JSONWriter writer = json_writer_new(lsp); @@ -500,6 +500,12 @@ static void write_request(LSP *lsp, LSPRequest *request) { write_document_position(o, def->position); write_obj_end(o); } break; + case LSP_REQUEST_WORKSPACE_SYMBOLS: { + const LSPRequestWorkspaceSymbols *syms = &request->data.workspace_symbols; + write_key_obj_start(o, "params"); + write_key_string(o, "query", syms->query); + 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"); |