[PATCH] D117036: [clangd] Remove --inlay-hints flag
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 12 23:29:42 PST 2022
sammccall updated this revision to Diff 399556.
sammccall retitled this revision from "[clangd] Retire --inlay-hints flag" to "[clangd] Remove --inlay-hints flag".
sammccall added a comment.
rename patch
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.399556.patch
Type: text/x-patch
Size: 2719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220113/6fe2fc77/attachment.bin>
More information about the cfe-commits
mailing list