================
@@ -497,6 +497,12 @@ bool fromJSON(const llvm::json::Value &Params,
ClientCapabilities &R,
if (auto Cancel = StaleRequestSupport->getBoolean("cancel"))
R.CancelsStaleRequests = *Cancel;
}
+ if (auto *OffsetEncoding = General->get("positionEncodings")) {
+ R.offsetEncoding.emplace();
+ if (!fromJSON(*OffsetEncoding, *R.offsetEncoding,
+ P.field("general").field("positionEncodings")))
+ return false;
+ }
}
if (auto *OffsetEncoding = O->get("offsetEncoding")) {
R.offsetEncoding.emplace();
----------------
kadircet wrote:
can we log a warning if we're overwriting general capability with a clangd
extension here, and also a deprecation message, asking clients to use general
capability instead?
we should also mention this in release notes here, and update clangd docs
https://clangd.llvm.org/extensions#utf-8-offsets, repo is at
https://github.com/llvm/clangd-www/pulls.
https://github.com/llvm/llvm-project/pull/142903
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits