[mlir] Add window.workDoneProgress LSP capability (#143449)
Adds the capability flag for [server-initiated work-done progress](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#serverInitiatedProgress).
This commit is contained in:
@@ -158,6 +158,12 @@ struct ClientCapabilities {
|
||||
/// Client supports CodeAction return value for textDocument/codeAction.
|
||||
/// textDocument.codeAction.codeActionLiteralSupport.
|
||||
bool codeActionStructure = false;
|
||||
|
||||
/// Client supports server-initiated progress via the
|
||||
/// window/workDoneProgress/create method.
|
||||
///
|
||||
/// window.workDoneProgress
|
||||
bool workDoneProgress = false;
|
||||
};
|
||||
|
||||
/// Add support for JSON serialization.
|
||||
|
||||
@@ -289,6 +289,11 @@ bool mlir::lsp::fromJSON(const llvm::json::Value &value,
|
||||
if (codeAction->getObject("codeActionLiteralSupport"))
|
||||
result.codeActionStructure = true;
|
||||
}
|
||||
if (auto *window = textDocument->getObject("window")) {
|
||||
if (std::optional<bool> workDoneProgressSupport =
|
||||
window->getBoolean("workDoneProgress"))
|
||||
result.workDoneProgress = *workDoneProgressSupport;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user