[PATCH] D51214: [clangd] Add option to enable/disable function argument snippets.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 19 03:19:55 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE342533: [clangd] Add option to enable/disable function argument snippets. (authored by kadircet, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D51214?vs=166076&id=166082#toc
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51214
Files:
clangd/tool/ClangdMain.cpp
Index: clangd/tool/ClangdMain.cpp
===================================================================
--- clangd/tool/ClangdMain.cpp
+++ clangd/tool/ClangdMain.cpp
@@ -169,6 +169,13 @@
"'compile_commands.json' files")),
llvm::cl::init(FilesystemCompileArgs), llvm::cl::Hidden);
+static llvm::cl::opt<bool> EnableFunctionArgSnippets(
+ "function-arg-placeholders",
+ llvm::cl::desc("When disabled, completions contain only parentheses for "
+ "function calls. When enabled, completions also contain "
+ "placeholders for method parameters."),
+ llvm::cl::init(clangd::CodeCompleteOptions().EnableFunctionArgSnippets));
+
int main(int argc, char *argv[]) {
llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
llvm::cl::SetVersionPrinter([](llvm::raw_ostream &OS) {
@@ -296,6 +303,7 @@
CCOpts.IncludeIndicator.NoInsert.clear();
}
CCOpts.SpeculativeIndexRequest = Opts.StaticIndex;
+ CCOpts.EnableFunctionArgSnippets = EnableFunctionArgSnippets;
// Initialize and run ClangdLSPServer.
ClangdLSPServer LSPServer(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51214.166082.patch
Type: text/x-patch
Size: 1118 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180919/4e11b362/attachment.bin>
More information about the cfe-commits
mailing list