| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "LibLsp/JsonRpc/RequestInMessage.h" |
| 4 |
#include "LibLsp/JsonRpc/lsResponseMessage.h" |
| 5 |
|
| 6 |
#include "LibLsp/lsp/symbol.h" |
| 7 |
|
| 8 |
namespace TextDocumentReferences |
| 9 |
{ |
| 10 |
|
| 11 |
struct lsReferenceContext |
| 12 |
{ |
| 13 |
// Include the declaration of the current symbol. |
| 14 |
optional<bool> includeDeclaration; |
| 15 |
MAKE_REFLECT_STRUCT(lsReferenceContext, includeDeclaration) |
| 16 |
}; |
| 17 |
struct Params |
| 18 |
{ |
| 19 |
lsTextDocumentIdentifier textDocument; |
| 20 |
lsPosition position; |
| 21 |
lsReferenceContext context; |
| 22 |
MAKE_SWAP_METHOD(Params, textDocument, position, context) |
| 23 |
}; |
| 24 |
|
| 25 |
}; // namespace TextDocumentReferences |
| 26 |
MAKE_REFLECT_STRUCT(TextDocumentReferences::lsReferenceContext, includeDeclaration); |
| 27 |
MAKE_REFLECT_STRUCT(TextDocumentReferences::Params, textDocument, position, context); |
| 28 |
|
| 29 |
/** |
| 30 |
* The references request is sent from the client to the server to resolve |
| 31 |
* project-wide references for the symbol denoted by the given text document |
| 32 |
* position. |
| 33 |
* |
| 34 |
* Registration Options: TextDocumentRegistrationOptions |
| 35 |
*/ |
| 36 |
DEFINE_REQUEST_RESPONSE_TYPE( |
| 37 |
td_references, TextDocumentReferences::Params, std::vector<lsLocation>, "textDocument/references" |
| 38 |
); |