diff --git a/clang-tools-extra/clangd/ClangdLSPServer.h b/clang-tools-extra/clangd/ClangdLSPServer.h --- a/clang-tools-extra/clangd/ClangdLSPServer.h +++ b/clang-tools-extra/clangd/ClangdLSPServer.h @@ -63,9 +63,6 @@ return !T.hidden(); // only enable non-hidden tweaks. }; - /// Enable InlayHints feature. - bool InlayHints = true; - /// Limit the number of references returned (0 means no limit). size_t ReferencesLimit = 0; }; diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -576,6 +576,7 @@ {"compilationDatabase", // clangd extension llvm::json::Object{{"automaticReload", true}}}, {"callHierarchyProvider", true}, + {"clangdInlayHintsProvider", true}, }; { @@ -608,10 +609,6 @@ if (Opts.FoldingRanges) ServerCaps["foldingRangeProvider"] = true; - // FIXME: once inlayHints can be disabled in config, always advertise. - if (Opts.InlayHints) - ServerCaps["clangdInlayHintsProvider"] = true; - std::vector Commands; for (llvm::StringRef Command : Handlers.CommandHandlers.keys()) Commands.push_back(Command); diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp --- a/clang-tools-extra/clangd/tool/ClangdMain.cpp +++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -23,7 +23,6 @@ #include "index/ProjectAware.h" #include "index/Serialization.h" #include "index/remote/Client.h" -#include "refactor/Rename.h" #include "support/Path.h" #include "support/Shutdown.h" #include "support/ThreadCrashReporter.h" @@ -294,6 +293,7 @@ RetiredFlag CollectMainFileRefs("collect-main-file-refs"); RetiredFlag CrossFileRename("cross-file-rename"); RetiredFlag ClangTidyChecks("clang-tidy-checks"); +RetiredFlag InlayHints("inlay-hints"); opt LimitResults{ "limit-results", @@ -327,15 +327,6 @@ Hidden, }; -opt InlayHints{ - "inlay-hints", - cat(Features), - desc("Enable InlayHints feature"), - init(ClangdLSPServer::Options().InlayHints), - // FIXME: allow inlayHints to be disabled in Config and remove this option. - Hidden, -}; - opt WorkerThreadsCount{ "j", cat(Misc), @@ -884,7 +875,6 @@ } Opts.AsyncThreadsCount = WorkerThreadsCount; Opts.FoldingRanges = FoldingRanges; - Opts.InlayHints = InlayHints; Opts.MemoryCleanup = getMemoryCleanupFunction(); Opts.CodeComplete.IncludeIneligibleResults = IncludeIneligibleResults;