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