Debian Codegraph @

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

raw
1 #pragma once
2
3 #include "LibLsp/JsonRpc/RequestInMessage.h"
4 #include "LibLsp/JsonRpc/lsResponseMessage.h"
5 #include "LibLsp/lsp/lsAny.h"
6 #include "LibLsp/lsp/symbol.h"
7 #include "LibLsp/lsp/lsTextDocumentPositionParams.h"
8 #include "LibLsp/lsp/lsRange.h"
9
10 struct LinkedEditingRangeParams
11 {
12 lsTextDocumentIdentifier textDocument;
13 lsPosition position;
14
15 MAKE_SWAP_METHOD(LinkedEditingRangeParams, textDocument, position)
16 };
17 MAKE_REFLECT_STRUCT(LinkedEditingRangeParams, textDocument, position)
18
19 struct LinkedEditingRanges
20 {
21 /**
22 * A list of ranges that can be renamed together. The ranges must have
23 * identical length and contain identical text content. The ranges cannot overlap.
24 */
25 std::vector<lsRange> ranges;
26
27 /**
28 * An optional word pattern (regular expression) that describes valid contents for
29 * the given ranges. If no pattern is provided, the client configuration's word
30 * pattern will be used.
31 */
32
33 optional<std::string> wordPattern;
34 MAKE_SWAP_METHOD(LinkedEditingRanges, ranges, wordPattern)
35 };
36
37 MAKE_REFLECT_STRUCT(LinkedEditingRanges, ranges, wordPattern)
38 DEFINE_REQUEST_RESPONSE_TYPE(
39 td_linkedEditingRange, LinkedEditingRangeParams, optional<std::vector<LinkedEditingRanges>>,
40 "textDocument/linkedEditingRange"
41 )