// FIXME: remove this option when Dex is cheap enough.
static llvm::cl::opt<bool>
UseDex("use-dex-index",
- llvm::cl::desc("Use experimental Dex dynamic index."),
+ llvm::cl::desc("Use experimental Dex dynamic index"),
llvm::cl::init(true), llvm::cl::Hidden);
static llvm::cl::opt<Path> CompileCommandsDir(
"compile-commands-dir",
llvm::cl::desc("Specify a path to look for compile_commands.json. If path "
"is invalid, clangd will look in the current directory and "
- "parent paths of each source file."));
+ "parent paths of each source file"));
static llvm::cl::opt<unsigned>
WorkerThreadsCount("j",
llvm::cl::values(
clEnumValN(Detailed, "detailed",
"One completion item for each semantically distinct "
- "completion, with full type information."),
+ "completion, with full type information"),
clEnumValN(Bundled, "bundled",
"Similar completion items (e.g. function overloads) are "
- "combined. Type information shown where possible.")),
+ "combined. Type information shown where possible")),
llvm::cl::init(Detailed));
// FIXME: Flags are the wrong mechanism for user preferences.
Test("lit-test",
llvm::cl::desc("Abbreviation for -input-style=delimited -pretty -sync "
"-enable-test-scheme -log=verbose."
- "Intended to simplify lit tests."),
+ "Intended to simplify lit tests"),
llvm::cl::init(false), llvm::cl::Hidden);
static llvm::cl::opt<bool> EnableTestScheme(
"enable-test-uri-scheme",
- llvm::cl::desc("Enable 'test:' URI scheme. Only use in lit tests."),
+ llvm::cl::desc("Enable 'test:' URI scheme. Only use in lit tests"),
llvm::cl::init(false), llvm::cl::Hidden);
enum PCHStorageFlag { Disk, Memory };
static llvm::cl::opt<int> LimitResults(
"limit-results",
llvm::cl::desc("Limit the number of results returned by clangd. "
- "0 means no limit. (default=100)"),
+ "0 means no limit (default=100)"),
llvm::cl::init(100));
static llvm::cl::opt<bool>
static llvm::cl::opt<Path> InputMirrorFile(
"input-mirror-file",
llvm::cl::desc(
- "Mirror all LSP input to the specified file. Useful for debugging."),
+ "Mirror all LSP input to the specified file. Useful for debugging"),
llvm::cl::init(""), llvm::cl::Hidden);
static llvm::cl::opt<bool> EnableIndex(
llvm::cl::desc(
"Enable index-based features. By default, clangd maintains an index "
"built from symbols in opened files. Global index support needs to "
- "enabled separatedly."),
+ "enabled separatedly"),
llvm::cl::init(true), llvm::cl::Hidden);
static llvm::cl::opt<bool> AllScopesCompletion(
"If set to true, code completion will include index symbols that are "
"not defined in the scopes (e.g. "
"namespaces) visible from the code completion point. Such completions "
- "can insert scope qualifiers."),
+ "can insert scope qualifiers"),
llvm::cl::init(true));
static llvm::cl::opt<bool> ShowOrigins(
"Include what you use. "
"Insert the owning header for top-level symbols, unless the "
"header is already directly included or the symbol is "
- "forward-declared."),
+ "forward-declared"),
clEnumValN(
CodeCompleteOptions::NeverInsert, "never",
"Never insert #include directives as part of code completion")));
"header-insertion-decorators",
llvm::cl::desc("Prepend a circular dot or space before the completion "
"label, depending on whether "
- "an include line will be inserted or not."),
+ "an include line will be inserted or not"),
llvm::cl::init(true));
static llvm::cl::opt<Path> IndexFile(
"index-file",
llvm::cl::desc(
"Index file to build the static index. The file must have been created "
- "by a compatible clangd-indexer.\n"
+ "by a compatible clangd-indexer\n"
"WARNING: This option is experimental only, and will be removed "
- "eventually. Don't rely on it."),
+ "eventually. Don't rely on it"),
llvm::cl::init(""), llvm::cl::Hidden);
static llvm::cl::opt<bool> EnableBackgroundIndex(
llvm::cl::desc(
"If set to non-zero, the background index rebuilds the symbol index "
"periodically every X milliseconds; otherwise, the "
- "symbol index will be updated for each indexed file."),
+ "symbol index will be updated for each indexed file"),
llvm::cl::init(5000), llvm::cl::Hidden);
enum CompileArgsFrom { LSPCompileArgs, FilesystemCompileArgs };
"function-arg-placeholders",
llvm::cl::desc("When disabled, completions contain only parentheses for "
"function calls. When enabled, completions also contain "
- "placeholders for method parameters."),
+ "placeholders for method parameters"),
llvm::cl::init(CodeCompleteOptions().EnableFunctionArgSnippets));
static llvm::cl::opt<std::string> ClangTidyChecks(
"clang-tidy-checks",
llvm::cl::desc(
"List of clang-tidy checks to run (this will override "
- ".clang-tidy files). Only meaningful when -clang-tidy flag is on."),
+ ".clang-tidy files). Only meaningful when -clang-tidy flag is on"),
llvm::cl::init(""));
static llvm::cl::opt<bool>
EnableClangTidy("clang-tidy",
- llvm::cl::desc("Enable clang-tidy diagnostics."),
+ llvm::cl::desc("Enable clang-tidy diagnostics"),
llvm::cl::init(true));
static llvm::cl::opt<std::string>
static llvm::cl::opt<bool> SuggestMissingIncludes(
"suggest-missing-includes",
llvm::cl::desc("Attempts to fix diagnostic errors caused by missing "
- "includes using index."),
+ "includes using index"),
llvm::cl::init(true));
static llvm::cl::opt<OffsetEncoding> ForceOffsetEncoding(
"offset-encoding",
llvm::cl::desc("Force the offsetEncoding used for character positions. "
- "This bypasses negotiation via client capabilities."),
+ "This bypasses negotiation via client capabilities"),
llvm::cl::values(clEnumValN(OffsetEncoding::UTF8, "utf-8",
"Offsets are in UTF-8 bytes"),
clEnumValN(OffsetEncoding::UTF16, "utf-16",