[PATCH] D117036: [clangd] Remove --inlay-hints flag
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 13 01:02:46 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG54eb70886cda: [clangd] Remove --inlay-hints flag (authored by sammccall).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117036/new/
https://reviews.llvm.org/D117036
Files:
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/ClangdLSPServer.h
clang-tools-extra/clangd/tool/ClangdMain.cpp
Index: clang-tools-extra/clangd/tool/ClangdMain.cpp
===================================================================
--- clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ 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<bool> CollectMainFileRefs("collect-main-file-refs");
RetiredFlag<bool> CrossFileRename("cross-file-rename");
RetiredFlag<std::string> ClangTidyChecks("clang-tidy-checks");
+RetiredFlag<std::string> InlayHints("inlay-hints");
opt<int> LimitResults{
"limit-results",
@@ -327,15 +327,6 @@
Hidden,
};
-opt<bool> 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<unsigned> WorkerThreadsCount{
"j",
cat(Misc),
@@ -884,7 +875,6 @@
}
Opts.AsyncThreadsCount = WorkerThreadsCount;
Opts.FoldingRanges = FoldingRanges;
- Opts.InlayHints = InlayHints;
Opts.MemoryCleanup = getMemoryCleanupFunction();
Opts.CodeComplete.IncludeIneligibleResults = IncludeIneligibleResults;
Index: clang-tools-extra/clangd/ClangdLSPServer.h
===================================================================
--- clang-tools-extra/clangd/ClangdLSPServer.h
+++ 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;
};
Index: clang-tools-extra/clangd/ClangdLSPServer.cpp
===================================================================
--- clang-tools-extra/clangd/ClangdLSPServer.cpp
+++ 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<llvm::StringRef> Commands;
for (llvm::StringRef Command : Handlers.CommandHandlers.keys())
Commands.push_back(Command);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117036.399577.patch
Type: text/x-patch
Size: 2719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220113/a7e300ba/attachment-0001.bin>
More information about the cfe-commits
mailing list