clang-tools  16.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
Collaboration diagram for clang::clangd::ClangdLSPServer::Options:
Collaboration graph

Public Attributes

config::ProviderConfigProvider = nullptr
 Supplies configuration (overrides ClangdServer::ContextProvider). More...
bool UseDirBasedCDB = true
 Look for compilation databases, rather than using compile commands set via LSP (extensions) only. More...
llvm::Optional< OffsetEncodingEncoding
 The offset-encoding to use, or None to negotiate it over LSP. More...
std::function< void()> MemoryCleanup = nullptr
 If set, periodically called to release memory. More...
clangd::CodeCompleteOptions CodeComplete
 Per-feature options. More...
MarkupKind SignatureHelpDocumentationFormat = MarkupKind::PlainText
clangd::RenameOptions Rename
std::function< bool(const Tweak &)> TweakFilter
 Returns true if the tweak should be enabled. More...
size_t ReferencesLimit = 0
 Limit the number of references returned (0 means no limit). More...
- Public Attributes inherited from clang::clangd::ClangdServer::Options
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...
clangd::PreambleThrottlerPreambleThrottler = nullptr
 This throttler controls which preambles may be built at a given time. 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 BackgroundIndex = false
 If true, ClangdServer automatically indexes files in the current project on background threads. More...
llvm::ThreadPriority BackgroundIndexPriority = llvm::ThreadPriority::Low
SymbolIndexStaticIndex = nullptr
 If set, use this index to augment code completion results. More...
std::function< Context(PathRef)> ContextProvider
 If set, queried to derive a processing context for some work. More...
TidyProviderRef ClangTidyProvider
 The Options provider to use when running clang-tidy. More...
llvm::Optional< std::string > WorkspaceRoot
 Clangd's workspace root. More...
llvm::Optional< std::string > ResourceDir = std::nullopt
 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 ImplicitCancellation = true
 Cancel certain requests if the file changes before they begin running. More...
std::vector< std::string > QueryDriverGlobs
 Clangd will execute compiler drivers matching one of these globs to fetch system include path. More...
bool LineFoldingOnly = false
FeatureModuleSetFeatureModules = nullptr
bool UseDirtyHeaders = false
 If true, use the dirty buffer contents when building Preambles. More...
bool PreambleParseForwardingFunctions = false

Additional Inherited Members

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

Detailed Description

Definition at line 39 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 53 of file ClangdLSPServer.h.

◆ ConfigProvider

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

Supplies configuration (overrides ClangdServer::ContextProvider).

Definition at line 41 of file ClangdLSPServer.h.

◆ Encoding

llvm::Optional<OffsetEncoding> clang::clangd::ClangdLSPServer::Options::Encoding

The offset-encoding to use, or None to negotiate it over LSP.

Definition at line 46 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 49 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 62 of file ClangdLSPServer.h.

◆ Rename

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

Definition at line 55 of file ClangdLSPServer.h.

◆ SignatureHelpDocumentationFormat

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

Definition at line 54 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 57 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 44 of file ClangdLSPServer.h.

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