clang-tools 23.0.0git
clang::clangd::DocumentSymbol Struct Reference

Represents programming constructs like variables, classes, interfaces etc. More...

#include <Protocol.h>

Public Attributes

std::string name
 The name of this symbol.
std::string detail
 More detail for this symbol, e.g the signature of a function.
SymbolKind kind
 The kind of this symbol.
bool deprecated = false
 Indicates if this symbol is deprecated.
std::vector< SymbolTagtags
 The tags for this symbol.
Range range
 The range enclosing this symbol not including leading/trailing whitespace but everything else like comments.
Range selectionRange
 The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
std::vector< DocumentSymbolchildren
 Children of this symbol, e.g. properties of a class.

Detailed Description

Represents programming constructs like variables, classes, interfaces etc.

that appear in a document. Document symbols can be hierarchical and they have two ranges: one that encloses its definition and one that points to its most interesting range, e.g. the range of an identifier.

Definition at line 1140 of file Protocol.h.

Member Data Documentation

◆ children

std::vector<DocumentSymbol> clang::clangd::DocumentSymbol::children

Children of this symbol, e.g. properties of a class.

Definition at line 1167 of file Protocol.h.

Referenced by clang::clangd::flattenSymbolHierarchy(), and clang::clangd::toJSON().

◆ deprecated

bool clang::clangd::DocumentSymbol::deprecated = false

Indicates if this symbol is deprecated.

Definition at line 1151 of file Protocol.h.

Referenced by clang::clangd::toJSON().

◆ detail

std::string clang::clangd::DocumentSymbol::detail

More detail for this symbol, e.g the signature of a function.

Definition at line 1145 of file Protocol.h.

Referenced by clang::clangd::toJSON().

◆ kind

SymbolKind clang::clangd::DocumentSymbol::kind

The kind of this symbol.

Definition at line 1148 of file Protocol.h.

Referenced by clang::clangd::flattenSymbolHierarchy(), and clang::clangd::toJSON().

◆ name

std::string clang::clangd::DocumentSymbol::name

The name of this symbol.

Definition at line 1142 of file Protocol.h.

Referenced by clang::clangd::flattenSymbolHierarchy(), clang::clangd::operator<<(), and clang::clangd::toJSON().

◆ range

Range clang::clangd::DocumentSymbol::range

The range enclosing this symbol not including leading/trailing whitespace but everything else like comments.

This information is typically used to determine if the clients cursor is inside the symbol to reveal in the symbol in the UI.

Definition at line 1160 of file Protocol.h.

Referenced by clang::clangd::flattenSymbolHierarchy(), and clang::clangd::toJSON().

◆ selectionRange

Range clang::clangd::DocumentSymbol::selectionRange

The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.

Must be contained by the range.

Definition at line 1164 of file Protocol.h.

Referenced by clang::clangd::toJSON().

◆ tags

std::vector<SymbolTag> clang::clangd::DocumentSymbol::tags

The tags for this symbol.

Definition at line 1154 of file Protocol.h.

Referenced by clang::clangd::toJSON().


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