summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/Protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/Protocol.h')
-rw-r--r--clang-tools-extra/clangd/Protocol.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/Protocol.h b/clang-tools-extra/clangd/Protocol.h
index 71ab9573a58..a6fcca6a40a 100644
--- a/clang-tools-extra/clangd/Protocol.h
+++ b/clang-tools-extra/clangd/Protocol.h
@@ -237,6 +237,33 @@ struct DidChangeTextDocumentParams {
parse(llvm::yaml::MappingNode *Params, clangd::Logger &Logger);
};
+enum class FileChangeType {
+ /// The file got created.
+ Created = 1,
+ /// The file got changed.
+ Changed = 2,
+ /// The file got deleted.
+ Deleted = 3
+};
+
+struct FileEvent {
+ /// The file's URI.
+ URI uri;
+ /// The change type.
+ FileChangeType type;
+
+ static llvm::Optional<FileEvent> parse(llvm::yaml::MappingNode *Params,
+ clangd::Logger &Logger);
+};
+
+struct DidChangeWatchedFilesParams {
+ /// The actual file events.
+ std::vector<FileEvent> changes;
+
+ static llvm::Optional<DidChangeWatchedFilesParams>
+ parse(llvm::yaml::MappingNode *Params, clangd::Logger &Logger);
+};
+
struct FormattingOptions {
/// Size of a tab in spaces.
int tabSize;
OpenPOWER on IntegriCloud