clang-tools 20.0.0git
|
Settings that express user/project preferences and control clangd behavior. More...
#include <Config.h>
Classes | |
struct | CDBSearchSpec |
struct | ExternalIndexSpec |
Describes an external index configuration. More... | |
Public Types | |
enum class | BackgroundPolicy { Build , Skip } |
enum class | IncludesPolicy { Strict , None } |
enum class | FastCheckPolicy { Strict , Loose , None } |
Public Member Functions | |
Config ()=default | |
Config (const Config &)=delete | |
Config & | operator= (const Config &)=delete |
Config (Config &&)=default | |
Config & | operator= (Config &&)=default |
Static Public Member Functions | |
static const Config & | current () |
Returns the Config of the current Context, or an empty configuration. | |
Public Attributes | |
struct { | |
std::vector< llvm::unique_function< void(std::vector< std::string > &) const > > Edits | |
Edits to apply to the compile command, in sequence. More... | |
CDBSearchSpec CDBSearch = {CDBSearchSpec::Ancestors, std::nullopt} | |
Where to search for compilation databases for this file's flags. More... | |
} | CompileFlags |
Controls how the compile command for the current file is determined. | |
struct { | |
BackgroundPolicy Background = BackgroundPolicy::Build | |
Whether this TU should be background-indexed. More... | |
ExternalIndexSpec External | |
bool StandardLibrary = true | |
} | Index |
Controls index behavior. | |
struct { | |
bool SuppressAll = false | |
llvm::StringSet Suppress | |
struct { | |
std::string Checks | |
llvm::StringMap< std::string > CheckOptions | |
FastCheckPolicy FastCheckFilter = FastCheckPolicy::Strict | |
} ClangTidy | |
Configures what clang-tidy checks to run and options to use with them. More... | |
IncludesPolicy UnusedIncludes = IncludesPolicy::Strict | |
IncludesPolicy MissingIncludes = IncludesPolicy::None | |
struct { | |
std::vector< std::function< bool(llvm::StringRef)> > IgnoreHeader | |
IncludeCleaner will not diagnose usages of these headers matched by these regexes. More... | |
bool AnalyzeAngledIncludes = false | |
} Includes | |
} | Diagnostics |
Controls warnings and errors when parsing code. | |
struct { | |
std::vector< std::string > FullyQualifiedNamespaces | |
} | Style |
Style of the codebase. | |
struct { | |
bool AllScopes = true | |
Whether code completion includes results that are not visible in current scopes. More... | |
} | Completion |
Configures code completion feature. | |
struct { | |
bool ShowAKA = true | |
Whether hover show a.k.a type. More... | |
} | Hover |
Configures hover feature. | |
struct { | |
bool Enabled = true | |
If false, inlay hints are completely disabled. More... | |
bool Parameters = true | |
bool DeducedTypes = true | |
bool Designators = true | |
bool BlockEnd = false | |
uint32_t TypeNameLimit = 32 | |
} | InlayHints |
struct { | |
std::vector< std::string > DisabledKinds | |
Controls highlighting kinds that are disabled. More... | |
std::vector< std::string > DisabledModifiers | |
Controls highlighting modifiers that are disabled. More... | |
} | SemanticTokens |
Static Public Attributes | |
static clangd::Key< Config > | Key |
Context key which can be used to set the current Config. | |
Settings that express user/project preferences and control clangd behavior.
Generally, features should consume Config::current() and the caller is responsible for setting it appropriately. In practice these callers are ClangdServer, TUScheduler, and BackgroundQueue.
|
strong |
|
strong |
|
strong |
|
default |
|
delete |
|
default |
|
static |
Returns the Config of the current Context, or an empty configuration.
Definition at line 17 of file Config.cpp.
References C, and clang::clangd::Context::current().
Referenced by clang::clangd::StdLibSet::add(), clang::clangd::ParsedAST::build(), clang::clangd::buildPreamble(), clang::clangd::ClangdServer::codeComplete(), clang::clangd::DirectoryBasedGlobalCompilationDatabase::BroadcastThread::Filter::filter(), clang::clangd::inlayHints(), and clang::clangd::CommandMangler::operator()().
bool clang::clangd::Config::AllScopes = true |
Whether code completion includes results that are not visible in current scopes.
Definition at line 133 of file Config.h.
Referenced by clang::clangd::ClangdServer::codeComplete().
BackgroundPolicy clang::clangd::Config::Background = BackgroundPolicy::Build |
CDBSearchSpec clang::clangd::Config::CDBSearch = {CDBSearchSpec::Ancestors, std::nullopt} |
Where to search for compilation databases for this file's flags.
Definition at line 68 of file Config.h.
Referenced by clang::clangd::DirectoryBasedGlobalCompilationDatabase::BroadcastThread::Filter::filter().
llvm::StringMap<std::string> clang::clangd::Config::CheckOptions |
struct { ... } clang::clangd::Config::ClangTidy |
Configures what clang-tidy checks to run and options to use with them.
struct { ... } clang::clangd::Config::CompileFlags |
Controls how the compile command for the current file is determined.
Referenced by clang::clangd::DirectoryBasedGlobalCompilationDatabase::BroadcastThread::Filter::filter().
struct { ... } clang::clangd::Config::Completion |
Configures code completion feature.
Referenced by clang::clangd::ClangdServer::codeComplete().
struct { ... } clang::clangd::Config::Diagnostics |
Controls warnings and errors when parsing code.
Referenced by clang::clangd::buildPreamble().
std::vector<std::string> clang::clangd::Config::DisabledKinds |
std::vector<std::string> clang::clangd::Config::DisabledModifiers |
std::vector<llvm::unique_function<void(std::vector<std::string> &) const> > clang::clangd::Config::Edits |
Edits to apply to the compile command, in sequence.
Definition at line 66 of file Config.h.
Referenced by clang::clangd::CommandMangler::operator()().
bool clang::clangd::Config::Enabled = true |
If false, inlay hints are completely disabled.
Definition at line 144 of file Config.h.
Referenced by clang::clangd::inlayHints().
ExternalIndexSpec clang::clangd::Config::External |
FastCheckPolicy clang::clangd::Config::FastCheckFilter = FastCheckPolicy::Strict |
std::vector<std::string> clang::clangd::Config::FullyQualifiedNamespaces |
struct { ... } clang::clangd::Config::Hover |
Configures hover feature.
std::vector<std::function<bool(llvm::StringRef)> > clang::clangd::Config::IgnoreHeader |
struct { ... } clang::clangd::Config::Includes |
struct { ... } clang::clangd::Config::Index |
Controls index behavior.
struct { ... } clang::clangd::Config::InlayHints |
Referenced by clang::clangd::inlayHints().
Context key which can be used to set the current Config.
Definition at line 48 of file Config.h.
Referenced by clang::clangd::TEST(), and clang::clangd::TEST_F().
IncludesPolicy clang::clangd::Config::MissingIncludes = IncludesPolicy::None |
struct { ... } clang::clangd::Config::SemanticTokens |
bool clang::clangd::Config::ShowAKA = true |
struct { ... } clang::clangd::Config::Style |
Style of the codebase.
llvm::StringSet clang::clangd::Config::Suppress |
Definition at line 100 of file Config.h.
Referenced by clang::clangd::buildPreamble().
bool clang::clangd::Config::SuppressAll = false |
Definition at line 99 of file Config.h.
Referenced by clang::clangd::buildPreamble().
IncludesPolicy clang::clangd::Config::UnusedIncludes = IncludesPolicy::Strict |