diff options
author | pommicket <pommicket@gmail.com> | 2022-12-30 16:27:31 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-30 16:27:31 -0500 |
commit | 72624969e99d284984614a33cabb4ed9fea31a0a (patch) | |
tree | 0339461c7d415a4a8cb7fa894e6306804b9c3739 /lsp-write.c | |
parent | ad841a324e905559ab7640956b0fbe2d2fdb3b77 (diff) |
write rename request
Diffstat (limited to 'lsp-write.c')
-rw-r--r-- | lsp-write.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lsp-write.c b/lsp-write.c index e5e0d09..41f6d81 100644 --- a/lsp-write.c +++ b/lsp-write.c @@ -273,6 +273,8 @@ static const char *lsp_request_method(LSPRequest *request) { return "textDocument/hover"; case LSP_REQUEST_DEFINITION: return "textDocument/definition"; + case LSP_REQUEST_RENAME: + return "textDocument/rename"; case LSP_REQUEST_WORKSPACE_FOLDERS: return "workspace/workspaceFolders"; case LSP_REQUEST_DID_CHANGE_WORKSPACE_FOLDERS: @@ -535,6 +537,13 @@ static void write_request(LSP *lsp, LSPRequest *request) { write_document_position(o, def->position); write_obj_end(o); } break; + case LSP_REQUEST_RENAME: { + const LSPRequestRename *rename = &request->data.rename; + write_key_obj_start(o, "params"); + write_document_position(o, rename->position); + write_key_string(o, "newName", rename->new_name); + write_obj_end(o); + } break; case LSP_REQUEST_WORKSPACE_SYMBOLS: { const LSPRequestWorkspaceSymbols *syms = &request->data.workspace_symbols; write_key_obj_start(o, "params"); |