summaryrefslogtreecommitdiff
path: root/lsp.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 21:12:33 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 21:12:33 -0500
commit9d9032fcd0f92d4c1838218f43e5b14acf2a99fc (patch)
treeb93c033e7d377d844e1a145f5fd1ff209c30a298 /lsp.h
parent1bd19da6910c85029c34c6d8cf65739a9e0a2127 (diff)
textDocument/rename response parsing
Diffstat (limited to 'lsp.h')
-rw-r--r--lsp.h39
1 files changed, 34 insertions, 5 deletions
diff --git a/lsp.h b/lsp.h
index fa89792..41fc94c 100644
--- a/lsp.h
+++ b/lsp.h
@@ -346,16 +346,45 @@ typedef struct {
} LSPResponseWorkspaceSymbols;
typedef enum {
- LSP_CHANGE_EDIT = 1
+ LSP_CHANGE_EDIT = 1,
+ LSP_CHANGE_CREATE,
+ LSP_CHANGE_RENAME,
+ LSP_CHANGE_DELETE
} LSPWorkspaceChangeType;
typedef struct {
+ LSPDocumentID document;
+ LSPTextEdit edit;
+} LSPWorkspaceChangeEdit;
+
+typedef struct {
+ LSPDocumentID document;
+ bool overwrite;
+ bool ignore_if_exists;
+} LSPWorkspaceChangeCreate;
+
+typedef struct {
+ LSPDocumentID old;
+ LSPDocumentID new;
+ bool overwrite;
+ bool ignore_if_exists;
+} LSPWorkspaceChangeRename;
+
+typedef struct {
+ LSPDocumentID document;
+ bool recursive;
+ bool ignore_if_not_exists;
+} LSPWorkspaceChangeDelete;
+
+// this doesn't exist in the LSP spec. it represents
+// a single change from a WorkspaceEdit.
+typedef struct {
LSPWorkspaceChangeType type;
union {
- struct {
- LSPDocumentID document;
- LSPTextEdit edit;
- } edit;
+ LSPWorkspaceChangeEdit edit;
+ LSPWorkspaceChangeCreate create;
+ LSPWorkspaceChangeRename rename;
+ LSPWorkspaceChangeDelete delete;
} data;
} LSPWorkspaceChange;