| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "LibLsp/JsonRpc/NotificationInMessage.h" |
| 4 |
|
| 5 |
#include "LibLsp/lsp/lsTextDocumentItem.h" |
| 6 |
|
| 7 |
// Open, view, change, close file |
| 8 |
namespace TextDocumentDidOpen |
| 9 |
{ |
| 10 |
|
| 11 |
struct Params |
| 12 |
{ |
| 13 |
lsTextDocumentItem textDocument; |
| 14 |
|
| 15 |
/** |
| 16 |
* Legacy property to support protocol version 1.0 requests. |
| 17 |
*/ |
| 18 |
optional<std::string> text; |
| 19 |
|
| 20 |
MAKE_SWAP_METHOD(TextDocumentDidOpen::Params, textDocument, text); |
| 21 |
}; |
| 22 |
|
| 23 |
} // namespace TextDocumentDidOpen |
| 24 |
MAKE_REFLECT_STRUCT(TextDocumentDidOpen::Params, textDocument, text); |
| 25 |
|
| 26 |
/** |
| 27 |
* The document open notification is sent from the client to the server to |
| 28 |
* signal newly opened text documents. The document's truth is now managed |
| 29 |
* by the client and the server must not try to read the document's truth |
| 30 |
* using the document's uri. |
| 31 |
* |
| 32 |
* Registration Options: TextDocumentRegistrationOptions |
| 33 |
*/ |
| 34 |
; |
| 35 |
|
| 36 |
DEFINE_NOTIFICATION_TYPE(Notify_TextDocumentDidOpen, TextDocumentDidOpen::Params, "textDocument/didOpen"); |