Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions mlir/include/mlir/Tools/lsp-server-support/Protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions mlir/lib/Tools/lsp-server-support/Protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading