[SupportLSP] Add DidSaveTextDocumentParams (#172637)

Add DidSaveTextDocumentParams

Direct copy from clangd.
This commit is contained in:
Bertik23 2026-01-20 15:37:39 +01:00 committed by GitHub
parent 6271028518
commit db7b766b09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 0 deletions

View File

@ -494,6 +494,18 @@ LLVM_ABI_FOR_TEST bool fromJSON(const llvm::json::Value &value,
DidCloseTextDocumentParams &result,
llvm::json::Path path);
//===----------------------------------------------------------------------===//
// DidSaveTextDocumentParams
//===----------------------------------------------------------------------===//
struct DidSaveTextDocumentParams {
/// The document that was saved.
TextDocumentIdentifier textDocument;
};
LLVM_ABI_FOR_TEST bool fromJSON(const llvm::json::Value &,
DidSaveTextDocumentParams &, llvm::json::Path);
//===----------------------------------------------------------------------===//
// DidChangeTextDocumentParams
//===----------------------------------------------------------------------===//

View File

@ -502,6 +502,16 @@ bool llvm::lsp::fromJSON(const llvm::json::Value &Value,
return O && O.map("textDocument", Result.textDocument);
}
//===----------------------------------------------------------------------===//
// DidSaveTextDocumentParams
//===----------------------------------------------------------------------===//
bool llvm::lsp::fromJSON(const llvm::json::Value &Params,
DidSaveTextDocumentParams &R, llvm::json::Path P) {
llvm::json::ObjectMapper O(Params, P);
return O && O.map("textDocument", R.textDocument);
}
//===----------------------------------------------------------------------===//
// DidChangeTextDocumentParams
//===----------------------------------------------------------------------===//