forked from qt-creator/qt-creator
Clangd: Allow to switch off background indexing
It is conceivable that users don't want to spend the extra CPU time on this. Change-Id: Ic3611c8d17d201ae986fad08b344369a8728ce1b Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -382,8 +382,11 @@ public:
|
||||
|
||||
static BaseClientInterface *clientInterface(const Utils::FilePath &jsonDbDir)
|
||||
{
|
||||
QString indexingOption = "--background-index";
|
||||
if (!CppTools::ClangdSettings::indexingEnabled())
|
||||
indexingOption += "=0";
|
||||
Utils::CommandLine cmd{CppTools::ClangdSettings::clangdFilePath(),
|
||||
{"--background-index", "--limit-results=0"}};
|
||||
{indexingOption, "--limit-results=0"}};
|
||||
if (!jsonDbDir.isEmpty())
|
||||
cmd.addArg("--compile-commands-dir=" + jsonDbDir.toString());
|
||||
if (clangdLog().isDebugEnabled())
|
||||
|
||||
Reference in New Issue
Block a user