summaryrefslogtreecommitdiff
path: root/lsp.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 16:27:31 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 16:27:31 -0500
commit72624969e99d284984614a33cabb4ed9fea31a0a (patch)
tree0339461c7d415a4a8cb7fa894e6306804b9c3739 /lsp.h
parentad841a324e905559ab7640956b0fbe2d2fdb3b77 (diff)
write rename request
Diffstat (limited to 'lsp.h')
-rw-r--r--lsp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lsp.h b/lsp.h
index 5d5f3c4..57c81b5 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_RENAME, // textDocument/rename
LSP_REQUEST_WORKSPACE_SYMBOLS, // workspace/symbol
LSP_REQUEST_DID_CHANGE_WORKSPACE_FOLDERS, // workspace/didChangeWorkspaceFolders
@@ -152,6 +153,11 @@ typedef struct {
} LSPRequestWorkspaceSymbols;
typedef struct {
+ LSPDocumentPosition position;
+ char *new_name;
+} LSPRequestRename;
+
+typedef struct {
LSPDocumentID *removed; // dynamic array
LSPDocumentID *added; // dynamic array
} LSPRequestDidChangeWorkspaceFolders;
@@ -174,6 +180,7 @@ typedef struct {
// LSP_REQUEST_SHOW_MESSAGE or LSP_REQUEST_LOG_MESSAGE
LSPRequestMessage message;
LSPRequestDidChangeWorkspaceFolders change_workspace_folders;
+ LSPRequestRename rename;
} data;
} LSPRequest;
@@ -380,6 +387,7 @@ typedef struct {
// sadly, as of me writing this, clangd and rust-analyzer don't support this
// (but jdtls and gopls do)
bool workspace_folders_support;
+ bool rename_support;
} LSPCapabilities;
typedef struct LSP {