| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "LibLsp/JsonRpc/NotificationInMessage.h" |
| 4 |
#include "LibLsp/lsp/lsDocumentUri.h" |
| 5 |
enum class lsFileChangeType |
| 6 |
{ |
| 7 |
Created = 1, |
| 8 |
Changed = 2, |
| 9 |
Deleted = 3, |
| 10 |
}; |
| 11 |
|
| 12 |
#ifdef _WIN32 |
| 13 |
MAKE_REFLECT_TYPE_PROXY(lsFileChangeType); |
| 14 |
#else |
| 15 |
//#pragma clang diagnostic push |
| 16 |
//#pragma clang diagnostic ignored "-Wunused-function" |
| 17 |
MAKE_REFLECT_TYPE_PROXY(lsFileChangeType); |
| 18 |
//#pragma clang diagnostic pop |
| 19 |
#endif |
| 20 |
|
| 21 |
/** |
| 22 |
* An event describing a file change. |
| 23 |
*/ |
| 24 |
struct lsFileEvent |
| 25 |
{ |
| 26 |
lsDocumentUri uri; |
| 27 |
lsFileChangeType type; |
| 28 |
|
| 29 |
MAKE_SWAP_METHOD(lsFileEvent, uri, type) |
| 30 |
}; |
| 31 |
MAKE_REFLECT_STRUCT(lsFileEvent, uri, type); |
| 32 |
|
| 33 |
struct lsDidChangeWatchedFilesParams |
| 34 |
{ |
| 35 |
std::vector<lsFileEvent> changes; |
| 36 |
MAKE_SWAP_METHOD(lsDidChangeWatchedFilesParams, changes); |
| 37 |
}; |
| 38 |
MAKE_REFLECT_STRUCT(lsDidChangeWatchedFilesParams, changes); |
| 39 |
|
| 40 |
/** |
| 41 |
* The workspace/didChangeWorkspaceFolders notification is sent from the client |
| 42 |
* to the server to inform the server about workspace folder configuration changes. |
| 43 |
* The notification is sent by default if both ServerCapabilities/workspaceFolders |
| 44 |
* and ClientCapabilities/workspace/workspaceFolders are true; or if the server has |
| 45 |
* registered to receive this notification it first. |
| 46 |
*/ |
| 47 |
|
| 48 |
DEFINE_NOTIFICATION_TYPE( |
| 49 |
Notify_WorkspaceDidChangeWatchedFiles, lsDidChangeWatchedFilesParams, "workspace/didChangeWatchedFiles" |
| 50 |
); |