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