|
clang-tools 24.0.0git
|
#include <ClangdServer.h>
Public Member Functions | |
| operator TUScheduler::Options () const | |
Public Attributes | |
| unsigned | AsyncThreadsCount = getDefaultAsyncThreadsCount() |
| To process requests asynchronously, ClangdServer spawns worker threads. | |
| ASTRetentionPolicy | RetentionPolicy |
| AST caching policy. The default is to keep up to 3 ASTs in memory. | |
| bool | StorePreamblesInMemory = true |
| Cached preambles are potentially large. If false, store them on disk. | |
| bool | EnableOutgoingCalls = true |
| Call hierarchy's outgoing calls feature requires additional index serving structures which increase memory usage. | |
| clangd::PreambleThrottler * | PreambleThrottler = nullptr |
| This throttler controls which preambles may be built at a given time. | |
| ModulesBuilder * | ModulesManager = nullptr |
| Manages to build module files. | |
| bool | BuildDynamicSymbolIndex = false |
| If true, ClangdServer builds a dynamic in-memory index for symbols in opened files and uses the index to augment code completion results. | |
| bool | BackgroundIndex = false |
| If true, ClangdServer automatically indexes files in the current project on background threads. | |
| llvm::ThreadPriority | BackgroundIndexPriority = llvm::ThreadPriority::Low |
| SymbolIndex * | StaticIndex = nullptr |
| If set, use this index to augment code completion results. | |
| std::function< Context(PathRef)> | ContextProvider |
| If set, queried to derive a processing context for some work. | |
| std::optional< std::string > | WorkspaceRoot |
| Clangd's workspace root. | |
| bool | StrongWorkspaceMode = false |
| Sets an alternate mode of operation. | |
| std::optional< std::string > | ResourceDir |
| The resource directory is used to find internal headers, overriding defaults and -resource-dir compiler flag). | |
| DebouncePolicy | UpdateDebounce |
| Time to wait after a new file version before computing diagnostics. | |
| bool | ImplicitCancellation = true |
| Cancel certain requests if the file changes before they begin running. | |
| std::vector< std::string > | QueryDriverGlobs |
| Clangd will execute compiler drivers matching one of these globs to fetch system include path. | |
| bool | LineFoldingOnly = false |
| FeatureModuleSet * | FeatureModules = nullptr |
| bool | UseDirtyHeaders = false |
| If true, use the dirty buffer contents when building Preambles. | |
| bool | PreambleParseForwardingFunctions = true |
| SkipPreambleBuildPolicy | SkipPreambleBuild |
| bool | ImportInsertions = false |
| Whether include fixer insertions for Objective-C code should use #import instead of #include. | |
| bool | PublishInactiveRegions = false |
| Whether to collect and publish information about inactive preprocessor regions in the document. | |
Definition at line 103 of file ClangdServer.h.
|
explicit |
Definition at line 203 of file ClangdServer.cpp.
References AsyncThreadsCount, clang::clangd::TUScheduler::Options::AsyncThreadsCount, ContextProvider, clang::clangd::TUScheduler::Options::ContextProvider, PreambleThrottler, clang::clangd::TUScheduler::Options::PreambleThrottler, RetentionPolicy, clang::clangd::TUScheduler::Options::RetentionPolicy, StorePreamblesInMemory, clang::clangd::TUScheduler::Options::StorePreamblesInMemory, UpdateDebounce, and clang::clangd::TUScheduler::Options::UpdateDebounce.
| unsigned clang::clangd::ClangdServer::Options::AsyncThreadsCount = getDefaultAsyncThreadsCount() |
To process requests asynchronously, ClangdServer spawns worker threads.
If this is zero, no threads are spawned. All work is done on the calling thread, and callbacks are invoked before "async" functions return.
Definition at line 107 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain(), clang::clangd::ClangdServer::ClangdServer(), operator TUScheduler::Options(), and clang::clangd::ClangdServer::optsForTest().
| bool clang::clangd::ClangdServer::Options::BackgroundIndex = false |
If true, ClangdServer automatically indexes files in the current project on background threads.
The index is stored in the project root.
Definition at line 131 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| llvm::ThreadPriority clang::clangd::ClangdServer::Options::BackgroundIndexPriority = llvm::ThreadPriority::Low |
Definition at line 132 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| bool clang::clangd::ClangdServer::Options::BuildDynamicSymbolIndex = false |
If true, ClangdServer builds a dynamic in-memory index for symbols in opened files and uses the index to augment code completion results.
Definition at line 128 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
If set, queried to derive a processing context for some work.
Usually used to inject Config (see createConfiguredContextProvider).
When the provider is called, the active context will be that inherited from the request (e.g. addDocument()), or from the ClangdServer constructor if there is no such request (e.g. background indexing).
The path is an absolute path of the file being processed. If there is no particular file (e.g. project loading) then it is empty.
Definition at line 146 of file ClangdServer.h.
Referenced by operator TUScheduler::Options().
| bool clang::clangd::ClangdServer::Options::EnableOutgoingCalls = true |
Call hierarchy's outgoing calls feature requires additional index serving structures which increase memory usage.
If false, these are not created and the feature is not enabled.
Definition at line 118 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| FeatureModuleSet* clang::clangd::ClangdServer::Options::FeatureModules = nullptr |
Definition at line 185 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| bool clang::clangd::ClangdServer::Options::ImplicitCancellation = true |
Cancel certain requests if the file changes before they begin running.
This is useful for "transient" actions like enumerateTweaks that were likely implicitly generated, and avoids redundant work if clients forget to cancel. Clients that always cancel stale requests should clear this.
Definition at line 176 of file ClangdServer.h.
| bool clang::clangd::ClangdServer::Options::ImportInsertions = false |
Whether include fixer insertions for Objective-C code should use #import instead of #include.
Definition at line 199 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| bool clang::clangd::ClangdServer::Options::LineFoldingOnly = false |
Definition at line 183 of file ClangdServer.h.
| ModulesBuilder* clang::clangd::ClangdServer::Options::ModulesManager = nullptr |
Manages to build module files.
Definition at line 124 of file ClangdServer.h.
| bool clang::clangd::ClangdServer::Options::PreambleParseForwardingFunctions = true |
Definition at line 190 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| clangd::PreambleThrottler* clang::clangd::ClangdServer::Options::PreambleThrottler = nullptr |
This throttler controls which preambles may be built at a given time.
Definition at line 121 of file ClangdServer.h.
Referenced by operator TUScheduler::Options().
| bool clang::clangd::ClangdServer::Options::PublishInactiveRegions = false |
Whether to collect and publish information about inactive preprocessor regions in the document.
Definition at line 203 of file ClangdServer.h.
| std::vector<std::string> clang::clangd::ClangdServer::Options::QueryDriverGlobs |
Clangd will execute compiler drivers matching one of these globs to fetch system include path.
Definition at line 180 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| std::optional<std::string> clang::clangd::ClangdServer::Options::ResourceDir |
The resource directory is used to find internal headers, overriding defaults and -resource-dir compiler flag).
If std::nullopt, ClangdServer calls CompilerInvocation::GetResourcePath() to obtain the standard resource directory.
Definition at line 163 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| ASTRetentionPolicy clang::clangd::ClangdServer::Options::RetentionPolicy |
AST caching policy. The default is to keep up to 3 ASTs in memory.
Definition at line 110 of file ClangdServer.h.
Referenced by operator TUScheduler::Options().
| SkipPreambleBuildPolicy clang::clangd::ClangdServer::Options::SkipPreambleBuild |
Definition at line 194 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| SymbolIndex* clang::clangd::ClangdServer::Options::StaticIndex = nullptr |
If set, use this index to augment code completion results.
Definition at line 135 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| bool clang::clangd::ClangdServer::Options::StorePreamblesInMemory = true |
Cached preambles are potentially large. If false, store them on disk.
Definition at line 113 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain(), operator TUScheduler::Options(), and clang::clangd::ClangdServer::optsForTest().
| bool clang::clangd::ClangdServer::Options::StrongWorkspaceMode = false |
Sets an alternate mode of operation.
Current effects are:
Definition at line 156 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| DebouncePolicy clang::clangd::ClangdServer::Options::UpdateDebounce |
Time to wait after a new file version before computing diagnostics.
Definition at line 166 of file ClangdServer.h.
Referenced by operator TUScheduler::Options(), and clang::clangd::ClangdServer::optsForTest().
| bool clang::clangd::ClangdServer::Options::UseDirtyHeaders = false |
If true, use the dirty buffer contents when building Preambles.
Definition at line 187 of file ClangdServer.h.
Referenced by clang::clangd::clangdMain().
| std::optional<std::string> clang::clangd::ClangdServer::Options::WorkspaceRoot |
Clangd's workspace root.
Relevant for "workspace" operations not bound to a particular file. FIXME: If not set, should use the current working directory.
Definition at line 151 of file ClangdServer.h.