Debian Codegraph @

LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h

raw
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/lsTextDocumentPositionParams.h"
8
9 /**
10 * The rename request is sent from the client to the server to do a
11 * workspace wide rename of a symbol.
12 *
13 * Registration Options: TextDocumentRegistrationOptions
14 */
15 struct PrepareRenameResult
16 {
17 /**
18 * The range of the string to rename
19 */
20
21 lsRange range;
22
23 /**
24 * A placeholder text of the string content to be renamed.
25 */
26
27 std::string placeholder;
28
29 MAKE_SWAP_METHOD(PrepareRenameResult, range, placeholder)
30 };
31 MAKE_REFLECT_STRUCT(PrepareRenameResult, range, placeholder)
32
33 typedef std::pair<optional<lsRange>, optional<PrepareRenameResult>> TextDocumentPrepareRenameResult;
34 extern void Reflect(Reader& visitor, TextDocumentPrepareRenameResult& value);
35
36 DEFINE_REQUEST_RESPONSE_TYPE(
37 td_prepareRename, lsTextDocumentPositionParams, TextDocumentPrepareRenameResult, "textDocument/prepareRename"
38 );