diff options
Diffstat (limited to 'clang-tools-extra/clangd/Protocol.h')
-rw-r--r-- | clang-tools-extra/clangd/Protocol.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/Protocol.h b/clang-tools-extra/clangd/Protocol.h index 76dcf52a87e..94838a8575a 100644 --- a/clang-tools-extra/clangd/Protocol.h +++ b/clang-tools-extra/clangd/Protocol.h @@ -397,6 +397,9 @@ struct InitializationOptions { // the compilation database doesn't describe an opened file. // The command used will be approximately `clang $FILE $fallbackFlags`. std::vector<std::string> fallbackFlags; + + /// Clients supports show file status for textDocument/clangd.fileStatus. + bool FileStatus = false; }; bool fromJSON(const llvm::json::Value &, InitializationOptions &); @@ -973,6 +976,18 @@ struct ReferenceParams : public TextDocumentPositionParams { }; bool fromJSON(const llvm::json::Value &, ReferenceParams &); +/// Clangd extension: indicates the current state of the file in clangd, +/// sent from server via the `textDocument/clangd.fileStatus` notification. +struct FileStatus { + /// The text document's URI. + URIForFile uri; + /// The human-readable string presents the current state of the file, can be + /// shown in the UI (e.g. status bar). + std::string state; + // FIXME: add detail messages. +}; +llvm::json::Value toJSON(const FileStatus &FStatus); + } // namespace clangd } // namespace clang |