diff --git a/src/config.h b/src/config.h index 108196b4..63bdc6cb 100644 --- a/src/config.h +++ b/src/config.h @@ -33,8 +33,9 @@ struct Config { std::string compilationDatabaseCommand; // Directory containing compile_commands.json. std::string compilationDatabaseDirectory; - // Cache directory for indexed files. - std::string cacheDirectory; + // Cache directory for indexed files, either absolute or relative to the + // project root. + std::string cacheDirectory = ".ccls-cache"; // Cache serialization format. // // "json" generates `cacheDirectory/.../xxx.json` files which can be pretty diff --git a/src/indexer.h b/src/indexer.h index f3006b23..aab4dffe 100644 --- a/src/indexer.h +++ b/src/indexer.h @@ -190,7 +190,7 @@ struct VarDef : NameMixin { uint8_t storage = clang::SC_None; bool is_local() const { - return spell && spell->kind != SymbolKind::File && + return spell && spell->kind == SymbolKind::Func && storage == clang::SC_None; }