From a997d4106a397c785473bec5862c91bdf49f06ee Mon Sep 17 00:00:00 2001 From: pommicket Date: Fri, 30 Dec 2022 21:18:10 -0500 Subject: workspaceEdit capabilities --- lsp-write.c | 9 ++++++++- lsp.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lsp-write.c b/lsp-write.c index 41f6d81..fb65c2d 100644 --- a/lsp-write.c +++ b/lsp-write.c @@ -437,7 +437,14 @@ static void write_request(LSP *lsp, LSPRequest *request) { write_obj_end(o); write_key_obj_start(o, "workspace"); write_key_bool(o, "workspaceFolders", true); - + write_key_obj_start(o, "workspaceEdit"); + write_key_bool(o, "documentChanges", true); + write_key_arr_start(o, "resourceOperations"); + write_arr_elem_string(o, "create"); + write_arr_elem_string(o, "rename"); + write_arr_elem_string(o, "delete"); + write_arr_end(o); + write_obj_end(o); write_key_obj_start(o, "symbol"); write_symbol_kind_support(o); write_symbol_tag_support(o); diff --git a/lsp.h b/lsp.h index 41fc94c..e9278a7 100644 --- a/lsp.h +++ b/lsp.h @@ -52,6 +52,7 @@ typedef enum { LSP_REQUEST_SIGNATURE_HELP, // textDocument/signatureHelp LSP_REQUEST_HOVER, // textDocument/hover LSP_REQUEST_DEFINITION, // textDocument/definition + //LSP_REQUEST_HIGHLIGHT, LSP_REQUEST_RENAME, // textDocument/rename LSP_REQUEST_WORKSPACE_SYMBOLS, // workspace/symbol LSP_REQUEST_DID_CHANGE_WORKSPACE_FOLDERS, // workspace/didChangeWorkspaceFolders -- cgit v1.2.3