kadircet updated this revision to Diff 166076. kadircet marked 14 inline comments as done. kadircet added a comment.
- Delete include fixit option. - Rebase 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(
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(
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits