diff options
author | pommicket <pommicket@gmail.com> | 2022-12-30 21:12:33 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-30 21:12:33 -0500 |
commit | 9d9032fcd0f92d4c1838218f43e5b14acf2a99fc (patch) | |
tree | b93c033e7d377d844e1a145f5fd1ff209c30a298 /lsp.h | |
parent | 1bd19da6910c85029c34c6d8cf65739a9e0a2127 (diff) |
textDocument/rename response parsing
Diffstat (limited to 'lsp.h')
-rw-r--r-- | lsp.h | 39 |
1 files changed, 34 insertions, 5 deletions
@@ -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; |