| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "LibLsp/JsonRpc/RequestInMessage.h" |
| 4 |
#include "LibLsp/JsonRpc/lsResponseMessage.h" |
| 5 |
|
| 6 |
#include "LibLsp/lsp/lsWorkspaceEdit.h" |
| 7 |
#include "LibLsp/lsp/lsTextDocumentIdentifier.h" |
| 8 |
|
| 9 |
namespace TextDocumentRename |
| 10 |
{ |
| 11 |
|
| 12 |
struct Params |
| 13 |
{ |
| 14 |
// The document to format. |
| 15 |
lsTextDocumentIdentifier textDocument; |
| 16 |
|
| 17 |
// The position at which this request was sent. |
| 18 |
lsPosition position; |
| 19 |
|
| 20 |
// The new name of the symbol. If the given name is not valid the |
| 21 |
// request must return a [ResponseError](#ResponseError) with an |
| 22 |
// appropriate message set. |
| 23 |
std::string newName; |
| 24 |
MAKE_SWAP_METHOD(Params, textDocument, position, newName); |
| 25 |
}; |
| 26 |
|
| 27 |
}; // namespace TextDocumentRename |
| 28 |
MAKE_REFLECT_STRUCT(TextDocumentRename::Params, textDocument, position, newName); |
| 29 |
/** |
| 30 |
* The rename request is sent from the client to the server to do a |
| 31 |
* workspace wide rename of a symbol. |
| 32 |
* |
| 33 |
* Registration Options: TextDocumentRegistrationOptions |
| 34 |
*/ |
| 35 |
DEFINE_REQUEST_RESPONSE_TYPE(td_rename, TextDocumentRename::Params, lsWorkspaceEdit, "textDocument/rename"); |