From 29472bb76915c4929aecc938300f6df31f63ac29 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Wed, 20 Jan 2021 12:38:32 +0100 Subject: [PATCH] [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 --- clang-tools-extra/clangd/ClangdLSPServer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp index dc89ebd..35aed21 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -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()); -- 2.7.4