Skip to content

Document Symbols ​

Provides the file outline and breadcrumb navigation via textDocument/documentSymbol: a nested symbol tree with ranges, selection ranges and a detail field that disambiguates overloads and shows declared types.

Symbol Hierarchy ​

Supported

Nested symbol tree

Symbols nest by their written scope; out-of-line definitions appear at their lexical position with qualified names

Supported

Symbol ranges and selection ranges

The range spans the whole declaration; the selection range covers the full written name, including multi-token names like ~Widget, operator== and operator bool

Unsupportedclangd#499

Access specifier grouping

Access specifiers do not form grouping nodes in the outline yet

Supported

Anonymous and inline scopes

Anonymous namespaces, unnamed structs and unions group their members under a placeholder name; inline namespace members stay under the inline namespace node

Supported

UTF-16 position encoding

Columns after non-ASCII text count UTF-16 code units

Symbol Kinds ​

Supported

Core symbol kinds

Namespaces, classes, structs, unions, enums and their members, functions, variables, fields, structured bindings and lambdas all appear in the outline with a mapped LSP symbol kind

Supported

Template declarations

Class, function and variable templates carry a template detail prefix; concepts and abbreviated function templates (concept auto parameters) appear as well

Supported

Template specializations and deduction guides

Explicit and partial specializations of class and variable templates appear with their template arguments in the name; members nest under their specialization; deduction guides render their deduced signature

Supported

Type aliases

typedef, using aliases and alias templates appear in the outline with a type alias detail

Supported

Explicit instantiation directives

Class, function and variable explicit instantiations appear as childless symbols

Supportedclangd#1744

Macro definitions

Object-like and function-like macros appear in the outline, with parameters detailed for function-like forms

Partial

Macros in the preamble region

Macros in the leading directive run are not outlined in editor requests yet

Supported

Module declarations

An interface unit's module declaration outlines the module it defines

Symbol Detail ​

Function signatures

Parameter and return types in the detail field disambiguate overloads; constructors drop the void return type

Supported

Variable and field types

Variable details show the declared type, while lambdas render as (lambda)

Supportedclangd#221

Default argument stripping

The signature is derived from the function type, so default parameter values never leak into the outline

Unsupported

Base classes in detail

Derived class details do not include their base classes yet

Supportedclangd#2221

Multiline signature ranges

The symbol range starts at the beginning of the declaration and spans the full signature, so editor sticky scroll anchors correctly

Supported

Scoped types

A written class scope appears in the detail exactly once, for nested classes, template-ids, aliases and dependent names alike

Missing Symbols ​

Unsupportedclangd#2226

Include directives

#include directives do not appear in the outline yet

Supportedclangd#616

Local symbols

Variables and types declared inside function bodies nest under their function

Unsupported

#pragma mark navigation markers

Editor section markers do not appear in the outline yet

Supported

Friend function definitions

A friend function defined inline in a class appears under that class

Symbol Tags ​

Unsupported

Deprecated tag

Deprecated symbols do not carry the LSP deprecated symbol tag yet

Unsupportedclangd#2123

Access and storage indicators

Outline entries do not expose access, static, virtual or abstract modifiers yet

Location Correctness ​

Supportedclangd#475

Symbols from macro expansions

A symbol produced by a macro invocation is located at the invocation, not at the macro definition

Supportedclangd#1941

Names spelled in macro arguments

The selection range points at the name written in the macro argument; names spelled in the macro body fall back to the invocation site