From 61db5a1a07f4fbe953d7cab9b6714fe5157a1265 Mon Sep 17 00:00:00 2001 From: pommicket Date: Fri, 30 Dec 2022 10:17:42 -0500 Subject: start workspace/symbol --- lsp-write.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lsp-write.c') 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"); -- cgit v1.2.3