Capability is in upcoming 3.17: https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/
(This is also useful for C++ embedders)
Paths
| Differential D98414
[clangd] Turn off implicit cancellation based on client capabilities ClosedPublic Authored by sammccall on Mar 11 2021, 4:44 AM.
Details Summary Capability is in upcoming 3.17: https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/ (This is also useful for C++ embedders)
Diff Detail
Event Timeline
Comment Actions thanks, lgtm!
This revision is now accepted and ready to land.Mar 11 2021, 9:28 AM This revision was landed with ongoing or failed builds.Mar 16 2021, 4:27 AM Closed by commit rG3b99731c4e7b: [clangd] Turn off implicit cancellation based on client capabilities (authored by sammccall). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 330934 clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/ClangdServer.h
clang-tools-extra/clangd/ClangdServer.cpp
clang-tools-extra/clangd/Protocol.h
clang-tools-extra/clangd/Protocol.cpp
|
this makes sense as is, but i wonder if we should lift this to LSPServer instead.
3.17 specs also introduce retryOnContentModified, which is supposed to be a list of RPC names. so if we decide to take that into account, rather than deciding on what's "transient" ourselves, having all of this hardcoded in clangdserver would be limiting.
We can accept a cancellation policy on all of the ClangdServer endpoints, have some sensible defaults in clangdlspserver, enable those to be overwritten by client specs on initialize. (or if we don't want to make them part of the signature i suppose we can make use of config/context, but ... yikes). WDYT?