| 1 |
#pragma once |
| 2 |
#include "LibLsp/lsp/lsFormattingOptions.h" |
| 3 |
|
| 4 |
#include "LibLsp/JsonRpc/RequestInMessage.h" |
| 5 |
#include "LibLsp/JsonRpc/lsResponseMessage.h" |
| 6 |
|
| 7 |
namespace TextDocumentFormatting |
| 8 |
{ |
| 9 |
|
| 10 |
struct Params |
| 11 |
{ |
| 12 |
/** |
| 13 |
* The document to format. |
| 14 |
*/ |
| 15 |
lsTextDocumentIdentifier textDocument; |
| 16 |
/** |
| 17 |
* The format options. |
| 18 |
*/ |
| 19 |
lsFormattingOptions options; |
| 20 |
MAKE_SWAP_METHOD(Params, textDocument, options); |
| 21 |
}; |
| 22 |
|
| 23 |
}; // namespace TextDocumentFormatting |
| 24 |
MAKE_REFLECT_STRUCT(TextDocumentFormatting::Params, textDocument, options); |
| 25 |
/** |
| 26 |
* The document formatting request is sent from the client to the server to |
| 27 |
* format a whole document. |
| 28 |
* |
| 29 |
* Registration Options: TextDocumentRegistrationOptions |
| 30 |
*/ |
| 31 |
DEFINE_REQUEST_RESPONSE_TYPE( |
| 32 |
td_formatting, TextDocumentFormatting::Params, std::vector<lsTextEdit>, "textDocument/formatting" |
| 33 |
); |