This patch allows it to set a default configuration as discussed in issue https://github.com/clangd/clangd/issues/845 by adding a startup option --default-config.
Diff Detail
Event Timeline
Sorry about the delay, I think this is OK to add.
clang-tools-extra/clangd/tool/ClangdMain.cpp | ||
---|---|---|
500 | why this change? user config is still loaded from those directories Maybe after the user config text, add "Extra config may be specified by --extra-config-file" | |
509 | "default" doesn't seem like the right term for this, as it's clearly not the default - the user is providing it! Also, there's also been desire to provide config inline in a flag (as opposed to a file) as this is more self-contained. Calling this config when it's actually a config filename is a bit confusing. maybe --extra-config-file? | |
512 | I think mentioning --enable-config is more confusing than helpful, since it's on by default. | |
959 | none of this path checking/resolution should be necessary, the fromYAMLFile provider already handles the case where the path does not exist. We don't expand tildes in paths clangd (or clang, generally) processes. |
why this change? user config is still loaded from those directories
Maybe after the user config text, add "Extra config may be specified by --extra-config-file"