clang-tools 20.0.0git
Public Attributes | List of all members
clang::clangd::ClangdLSPServer::Options Struct Reference

#include <ClangdLSPServer.h>

Inheritance diagram for clang::clangd::ClangdLSPServer::Options:
Inheritance graph
[legend]

Public Attributes

config::ProviderConfigProvider = nullptr
 Supplies configuration (overrides ClangdServer::ContextProvider).
 
bool UseDirBasedCDB = true
 Look for compilation databases, rather than using compile commands set via LSP (extensions) only.
 
std::optional< OffsetEncodingEncoding
 The offset-encoding to use, or std::nullopt to negotiate it over LSP.
 
std::function< void()> MemoryCleanup = nullptr
 If set, periodically called to release memory.
 
clangd::CodeCompleteOptions CodeComplete
 Per-feature options.
 
MarkupKind SignatureHelpDocumentationFormat = MarkupKind::PlainText
 
clangd::RenameOptions Rename
 
std::function< bool(const Tweak &)> TweakFilter
 Returns true if the tweak should be enabled.
 
size_t ReferencesLimit = 0
 Limit the number of references returned (0 means no limit).
 
bool EnableExperimentalModulesSupport = false
 Flag to hint the experimental modules support is enabled.
 
- Public Attributes inherited from clang::clangd::ClangdServer::Options
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::PreambleThrottlerPreambleThrottler = nullptr
 This throttler controls which preambles may be built at a given time.
 
ModulesBuilderModulesManager = 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
 
SymbolIndexStaticIndex = 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.
 
TidyProviderRef ClangTidyProvider
 The Options provider to use when running clang-tidy.
 
std::optional< std::string > WorkspaceRoot
 Clangd's workspace root.
 
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
 
FeatureModuleSetFeatureModules = nullptr
 
bool UseDirtyHeaders = false
 If true, use the dirty buffer contents when building Preambles.
 
bool PreambleParseForwardingFunctions = false
 
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.
 

Additional Inherited Members

- Public Member Functions inherited from clang::clangd::ClangdServer::Options
 operator TUScheduler::Options () const
 

Detailed Description

Definition at line 42 of file ClangdLSPServer.h.

Member Data Documentation

◆ CodeComplete

clangd::CodeCompleteOptions clang::clangd::ClangdLSPServer::Options::CodeComplete

Per-feature options.

Generally ClangdServer lets these vary per-request, but LSP allows limited/no customizations.

Definition at line 56 of file ClangdLSPServer.h.

◆ ConfigProvider

config::Provider* clang::clangd::ClangdLSPServer::Options::ConfigProvider = nullptr

Supplies configuration (overrides ClangdServer::ContextProvider).

Definition at line 44 of file ClangdLSPServer.h.

◆ EnableExperimentalModulesSupport

bool clang::clangd::ClangdLSPServer::Options::EnableExperimentalModulesSupport = false

Flag to hint the experimental modules support is enabled.

Definition at line 68 of file ClangdLSPServer.h.

◆ Encoding

std::optional<OffsetEncoding> clang::clangd::ClangdLSPServer::Options::Encoding

The offset-encoding to use, or std::nullopt to negotiate it over LSP.

Definition at line 49 of file ClangdLSPServer.h.

◆ MemoryCleanup

std::function<void()> clang::clangd::ClangdLSPServer::Options::MemoryCleanup = nullptr

If set, periodically called to release memory.

Consider malloc_trim(3)

Definition at line 52 of file ClangdLSPServer.h.

◆ ReferencesLimit

size_t clang::clangd::ClangdLSPServer::Options::ReferencesLimit = 0

Limit the number of references returned (0 means no limit).

Definition at line 65 of file ClangdLSPServer.h.

◆ Rename

clangd::RenameOptions clang::clangd::ClangdLSPServer::Options::Rename

Definition at line 58 of file ClangdLSPServer.h.

◆ SignatureHelpDocumentationFormat

MarkupKind clang::clangd::ClangdLSPServer::Options::SignatureHelpDocumentationFormat = MarkupKind::PlainText

Definition at line 57 of file ClangdLSPServer.h.

◆ TweakFilter

std::function<bool(const Tweak &)> clang::clangd::ClangdLSPServer::Options::TweakFilter
Initial value:
= [](const Tweak &T) {
return !T.hidden();
}

Returns true if the tweak should be enabled.

Definition at line 60 of file ClangdLSPServer.h.

◆ UseDirBasedCDB

bool clang::clangd::ClangdLSPServer::Options::UseDirBasedCDB = true

Look for compilation databases, rather than using compile commands set via LSP (extensions) only.

Definition at line 47 of file ClangdLSPServer.h.


The documentation for this struct was generated from the following file: