Index: clangd/tool/ClangdMain.cpp =================================================================== --- clangd/tool/ClangdMain.cpp +++ clangd/tool/ClangdMain.cpp @@ -194,6 +194,19 @@ "'compile_commands.json' files")), llvm::cl::init(FilesystemCompileArgs), llvm::cl::Hidden); +static llvm::cl::opt IncludeFixIts( + "include-fixits", + llvm::cl::desc( + "Enables suggestion of completion items that needs additional changes. " + "Like changing an arrow(->) member access to dot(.) member access."), + llvm::cl::init(clangd::CodeCompleteOptions().IncludeFixIts)); + +static llvm::cl::opt EnableFunctionArgSnippets( + "enable-function-arg-snippets", + llvm::cl::desc("Gives snippets for function arguments, when disabled only " + "gives parantheses for the call."), + llvm::cl::init(clangd::CodeCompleteOptions().EnableFunctionArgSnippets)); + int main(int argc, char *argv[]) { llvm::sys::PrintStackTraceOnErrorSignal(argv[0]); llvm::cl::SetVersionPrinter([](llvm::raw_ostream &OS) { @@ -309,6 +322,8 @@ CCOpts.IncludeIndicator.NoInsert.clear(); } CCOpts.SpeculativeIndexRequest = Opts.StaticIndex; + CCOpts.IncludeFixIts = IncludeFixIts; + CCOpts.EnableFunctionArgSnippets = EnableFunctionArgSnippets; // Initialize and run ClangdLSPServer. ClangdLSPServer LSPServer(