[clangd] Log warning when using legacy (theia) semantic highlighting.

The legacy protocol will be removed on trunk after the 12 branch cut,
and gone in clangd 13.

Differential Revision: https://reviews.llvm.org/D95031
This commit is contained in:
Sam McCall 2021-01-20 12:38:32 +01:00
parent d91ee2f782
commit 29472bb769
1 changed files with 5 additions and 0 deletions

View File

@ -510,6 +510,11 @@ void ClangdLSPServer::onInitialize(const InitializeParams &Params,
"semanticTokens request, choosing the latter (no notifications).");
Opts.TheiaSemanticHighlighting = false;
}
if (Opts.TheiaSemanticHighlighting) {
log("Using legacy semanticHighlights notification, which will be removed "
"in clangd 13. Clients should use the standard semanticTokens "
"request instead.");
}
if (Params.rootUri && *Params.rootUri)
Opts.WorkspaceRoot = std::string(Params.rootUri->file());