summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 21:18:10 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 21:18:10 -0500
commita997d4106a397c785473bec5862c91bdf49f06ee (patch)
treeddc2ce89c1537d91a7c78116e72945e3653fd748
parent9d9032fcd0f92d4c1838218f43e5b14acf2a99fc (diff)
workspaceEdit capabilities
-rw-r--r--lsp-write.c9
-rw-r--r--lsp.h1
2 files changed, 9 insertions, 1 deletions
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