clang-tools
11.0.0
|
#include <ClangdServer.h>
Public Member Functions | |
operator TUScheduler::Options () const | |
Public Attributes | |
unsigned | AsyncThreadsCount = getDefaultAsyncThreadsCount() |
To process requests asynchronously, ClangdServer spawns worker threads. More... | |
ASTRetentionPolicy | RetentionPolicy |
AST caching policy. The default is to keep up to 3 ASTs in memory. More... | |
bool | StorePreamblesInMemory = true |
Cached preambles are potentially large. If false, store them on disk. More... | |
bool | AsyncPreambleBuilds = true |
Reuse even stale preambles, and rebuild them in the background. More... | |
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. More... | |
bool | HeavyweightDynamicSymbolIndex = true |
Use a heavier and faster in-memory index implementation. More... | |
bool | BackgroundIndex = false |
If true, ClangdServer automatically indexes files in the current project on background threads. More... | |
SymbolIndex * | StaticIndex = nullptr |
If set, use this index to augment code completion results. More... | |
config::Provider * | ConfigProvider = nullptr |
If set, queried to obtain the configuration to handle each request. More... | |
ClangTidyOptionsBuilder | GetClangTidyOptions |
If set, enable clang-tidy in clangd and use to it get clang-tidy configurations for a particular file. More... | |
bool | BuildRecoveryAST = true |
If true, turn on the -frecovery-ast clang flag. More... | |
bool | PreserveRecoveryASTType = false |
If true, turn on the -frecovery-ast-type clang flag. More... | |
llvm::Optional< std::string > | WorkspaceRoot |
Clangd's workspace root. More... | |
llvm::Optional< std::string > | ResourceDir = llvm::None |
The resource directory is used to find internal headers, overriding defaults and -resource-dir compiler flag). More... | |
DebouncePolicy | UpdateDebounce |
Time to wait after a new file version before computing diagnostics. More... | |
bool | SuggestMissingIncludes = false |
std::vector< std::string > | QueryDriverGlobs |
Clangd will execute compiler drivers matching one of these globs to fetch system include path. More... | |
bool | TheiaSemanticHighlighting = false |
Enable notification-based semantic highlighting. More... | |
bool | FoldingRanges = false |
Enable preview of FoldingRanges feature. More... | |
std::function< bool(const Tweak &)> | TweakFilter |
Returns true if the tweak should be enabled. More... | |
Definition at line 90 of file ClangdServer.h.
|
explicit |
Definition at line 124 of file ClangdServer.cpp.
bool clang::clangd::ClangdServer::Options::AsyncPreambleBuilds = true |
Reuse even stale preambles, and rebuild them in the background.
This improves latency at the cost of accuracy.
Definition at line 103 of file ClangdServer.h.
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 94 of file ClangdServer.h.
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 112 of file ClangdServer.h.
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 107 of file ClangdServer.h.
bool clang::clangd::ClangdServer::Options::BuildRecoveryAST = true |
If true, turn on the -frecovery-ast
clang flag.
Definition at line 128 of file ClangdServer.h.
config::Provider* clang::clangd::ClangdServer::Options::ConfigProvider = nullptr |
If set, queried to obtain the configuration to handle each request.
Definition at line 118 of file ClangdServer.h.
bool clang::clangd::ClangdServer::Options::FoldingRanges = false |
Enable preview of FoldingRanges feature.
Definition at line 161 of file ClangdServer.h.
ClangTidyOptionsBuilder clang::clangd::ClangdServer::Options::GetClangTidyOptions |
If set, enable clang-tidy in clangd and use to it get clang-tidy configurations for a particular file.
Clangd supports only a small subset of ClangTidyOptions, these options (Checks, CheckOptions) are about which clang-tidy checks will be enabled.
Definition at line 125 of file ClangdServer.h.
bool clang::clangd::ClangdServer::Options::HeavyweightDynamicSymbolIndex = true |
Use a heavier and faster in-memory index implementation.
Definition at line 109 of file ClangdServer.h.
bool clang::clangd::ClangdServer::Options::PreserveRecoveryASTType = false |
If true, turn on the -frecovery-ast-type
clang flag.
Definition at line 131 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 155 of file ClangdServer.h.
llvm::Optional<std::string> clang::clangd::ClangdServer::Options::ResourceDir = llvm::None |
The resource directory is used to find internal headers, overriding defaults and -resource-dir compiler flag).
If None, ClangdServer calls CompilerInvocation::GetResourcePath() to obtain the standard resource directory.
Definition at line 142 of file ClangdServer.h.
ASTRetentionPolicy clang::clangd::ClangdServer::Options::RetentionPolicy |
AST caching policy. The default is to keep up to 3 ASTs in memory.
Definition at line 97 of file ClangdServer.h.
SymbolIndex* clang::clangd::ClangdServer::Options::StaticIndex = nullptr |
If set, use this index to augment code completion results.
Definition at line 115 of file ClangdServer.h.
bool clang::clangd::ClangdServer::Options::StorePreamblesInMemory = true |
Cached preambles are potentially large. If false, store them on disk.
Definition at line 100 of file ClangdServer.h.
bool clang::clangd::ClangdServer::Options::SuggestMissingIncludes = false |
Definition at line 151 of file ClangdServer.h.
bool clang::clangd::ClangdServer::Options::TheiaSemanticHighlighting = false |
Enable notification-based semantic highlighting.
Definition at line 158 of file ClangdServer.h.
std::function<bool(const Tweak &)> clang::clangd::ClangdServer::Options::TweakFilter |
Returns true if the tweak should be enabled.
Definition at line 164 of file ClangdServer.h.
DebouncePolicy clang::clangd::ClangdServer::Options::UpdateDebounce |
Time to wait after a new file version before computing diagnostics.
Definition at line 145 of file ClangdServer.h.
llvm::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 136 of file ClangdServer.h.