Index: clangd/tool/ClangdMain.cpp =================================================================== --- clangd/tool/ClangdMain.cpp +++ clangd/tool/ClangdMain.cpp @@ -168,6 +168,20 @@ "'compile_commands.json' files")), llvm::cl::init(FilesystemCompileArgs), llvm::cl::Hidden); +static llvm::cl::opt IncludeFixIts( + "completions-with-fixes", + llvm::cl::desc( + "Enables suggestion of completion items that need additional changes. " + "Like changing an arrow(->) member access to dot(.) member access."), + llvm::cl::init(clangd::CodeCompleteOptions().IncludeFixIts)); + +static llvm::cl::opt 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) { @@ -295,6 +309,8 @@ CCOpts.IncludeIndicator.NoInsert.clear(); } CCOpts.SpeculativeIndexRequest = Opts.StaticIndex; + CCOpts.IncludeFixIts = IncludeFixIts; + CCOpts.EnableFunctionArgSnippets = EnableFunctionArgSnippets; // Initialize and run ClangdLSPServer. ClangdLSPServer LSPServer(