clang-tools 8.0.0

Public Attributes | List of all members
clang::clangd::ClangdServer::Options Struct Reference

`#include <ClangdServer.h>`

Collaboration diagram for clang::clangd::ClangdServer::Options:
[legend]

## 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 | 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 = false
| 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...
size_t | BackgroundIndexRebuildPeriodMs = 0
| If set to non-zero, the background index rebuilds the symbol index periodically every BuildIndexPeriodMs milliseconds; otherwise, the symbol index will be updated for each indexed file. More...
SymbolIndex * | StaticIndex = nullptr
| If set, use this index to augment code completion results. 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...
std::chrono::steady_clock::duration | UpdateDebounce
| Time to wait after a new file version before computing diagnostics. More...

## Detailed Description

Definition at line 67 of file ClangdServer.h.

## Member Data Documentation

## ◆ AsyncThreadsCount

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 71 of file ClangdServer.h.

## ◆ BackgroundIndex

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 87 of file ClangdServer.h.

## ◆ BackgroundIndexRebuildPeriodMs

size_t clang::clangd::ClangdServer::Options::BackgroundIndexRebuildPeriodMs = 0

If set to non-zero, the background index rebuilds the symbol index periodically every BuildIndexPeriodMs milliseconds; otherwise, the symbol index will be updated for each indexed file.

Definition at line 91 of file ClangdServer.h.

## ◆ BuildDynamicSymbolIndex

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 81 of file ClangdServer.h.

## ◆ HeavyweightDynamicSymbolIndex

bool clang::clangd::ClangdServer::Options::HeavyweightDynamicSymbolIndex = false

Use a heavier and faster in-memory index implementation.

FIXME: we should make this true if it isn't too slow to build!.

Definition at line 84 of file ClangdServer.h.

## ◆ ResourceDir

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 105 of file ClangdServer.h.

## ◆ RetentionPolicy

ASTRetentionPolicy clang::clangd::ClangdServer::Options::RetentionPolicy

AST caching policy. The default is to keep up to 3 ASTs in memory.

Definition at line 74 of file ClangdServer.h.

## ◆ StaticIndex

SymbolIndex* clang::clangd::ClangdServer::Options::StaticIndex = nullptr

If set, use this index to augment code completion results.

Definition at line 94 of file ClangdServer.h.

## ◆ StorePreamblesInMemory

bool clang::clangd::ClangdServer::Options::StorePreamblesInMemory = true

Cached preambles are potentially large. If false, store them on disk.

Definition at line 77 of file ClangdServer.h.

## ◆ UpdateDebounce

std::chrono::steady_clock::duration clang::clangd::ClangdServer::Options::UpdateDebounce

Initial value:
=
std::chrono::milliseconds(500)

Time to wait after a new file version before computing diagnostics.

Definition at line 108 of file ClangdServer.h.

## ◆ WorkspaceRoot

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 99 of file ClangdServer.h.

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

- ClangdServer.h