| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "LibLsp/JsonRpc/RequestInMessage.h" |
| 4 |
#include "LibLsp/JsonRpc/lsResponseMessage.h" |
| 5 |
|
| 6 |
struct lsDocumentCodeLensParams |
| 7 |
{ |
| 8 |
|
| 9 |
/** |
| 10 |
* The document to request code lens for. |
| 11 |
*/ |
| 12 |
lsTextDocumentIdentifier textDocument; |
| 13 |
|
| 14 |
MAKE_SWAP_METHOD(lsDocumentCodeLensParams, textDocument); |
| 15 |
}; |
| 16 |
MAKE_REFLECT_STRUCT(lsDocumentCodeLensParams, textDocument); |
| 17 |
|
| 18 |
struct lsCodeLens |
| 19 |
{ |
| 20 |
// The range in which this code lens is valid. Should only span a single line. |
| 21 |
lsRange range; |
| 22 |
// The command this code lens represents. |
| 23 |
optional<lsCommandWithAny> command; |
| 24 |
// A data entry field that is preserved on a code lens item between |
| 25 |
// a code lens and a code lens resolve request. |
| 26 |
optional<lsp::Any> data; |
| 27 |
|
| 28 |
MAKE_SWAP_METHOD(lsCodeLens, range, command, data) |
| 29 |
}; |
| 30 |
MAKE_REFLECT_STRUCT(lsCodeLens, range, command, data) |
| 31 |
|
| 32 |
/** |
| 33 |
* The code lens request is sent from the client to the server to compute |
| 34 |
* code lenses for a given text document. |
| 35 |
* |
| 36 |
* Registration Options: CodeLensRegistrationOptions |
| 37 |
*/ |
| 38 |
DEFINE_REQUEST_RESPONSE_TYPE(td_codeLens, lsDocumentCodeLensParams, std::vector<lsCodeLens>, "textDocument/codeLens") |