diff options
Diffstat (limited to 'clangd/ClangdServer.h')
-rw-r--r-- | clangd/ClangdServer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clangd/ClangdServer.h b/clangd/ClangdServer.h index f9c8f92c..746e6d03 100644 --- a/clangd/ClangdServer.h +++ b/clangd/ClangdServer.h @@ -17,6 +17,7 @@ #include "Function.h" #include "GlobalCompilationDatabase.h" #include "Protocol.h" +#include "index/FileIndex.h" #include "clang/Tooling/CompilationDatabase.h" #include "clang/Tooling/Core/Replacement.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" @@ -195,10 +196,15 @@ public: /// /// \p StorePreamblesInMemory defines whether the Preambles generated by /// clangd are stored in-memory or on disk. + /// + /// If \p BuildDynamicSymbolIndex is true, ClangdServer builds a dynamic + /// in-memory index for symbols in all opened files and uses the index to + /// augment code completion results. ClangdServer(GlobalCompilationDatabase &CDB, DiagnosticsConsumer &DiagConsumer, FileSystemProvider &FSProvider, unsigned AsyncThreadsCount, bool StorePreamblesInMemory, + bool BuildDynamicSymbolIndex = false, llvm::Optional<StringRef> ResourceDir = llvm::None); /// Set the root path of the workspace. @@ -330,6 +336,8 @@ private: DiagnosticsConsumer &DiagConsumer; FileSystemProvider &FSProvider; DraftStore DraftMgr; + /// If set, this manages index for symbols in opened files. + std::unique_ptr<FileIndex> FileIdx; CppFileCollection Units; std::string ResourceDir; // If set, this represents the workspace path. |