Skip to content

Hover ​

Rich information cards for the symbol under the cursor.

Symbols ​

The card names what the symbol is and the scope it is declared in, and shows its declaration.

Supported

Symbol kinds

The card's title names what the symbol is: namespace, struct, union, enum, enumerator, alias, field, function

Supported

Scopes

The card says which namespace, class or function the symbol is declared in

Supported

Access

A member's title names its access when it is protected or private

Supported

Definitions

The card shows the symbol's declaration as source, at its definition and at its uses

Supportedclangd#2474

Virtual methods

A method's definition reads virtual, override or final as written, and an override names the method it overrides, the keyword written or not

Supportedclangd#436

Anonymous namespaces

The scope of a card names the anonymous namespace a name is declared in

Supported

Deprecated symbols

A deprecated function's card says so, with the message its deprecation gives

The message of [[deprecated]] usually tells what to use instead.

Supported

Symbols from headers

A symbol declared in an included header shows its documentation and definition

Supported

Objective-C symbols

Hovering an Objective-C class, protocol, method, property or instance variable shows its declaration and where it belongs

A member names the class or the category declaring it, Shape(Extras), and an @implementation shows the @interface it implements. Any piece of a selector shows its method.

Functions ​

A function's card shows its signature.

Supported

Function signatures

A function's card shows its signature, each parameter with its name and default

Variables ​

A variable's card spells its type as written, and its value when that is known at compile time.

Supported

Declarator types

A variable's card spells its pointer, reference and array declarators as written

Supported

Constant values

A variable or enumerator whose value is known at compile time shows it

Supportedclangd#710

Long initializers

A long initializer is left out of the definition, and the value shows its first elements

Supported

__func__

Hovering __func__ shows the name of the function it is in, when the function is not a template

Members of Types ​

A class lists its data members and member types, and an enum its enumerators.

Supportedclangd#959

Members of types

A class lists its data members and member types, an enum its enumerators with their values

max_members caps the list, 20 by default; 0 shows the declaration alone.

Type Aliases ​

A type spelled through an alias shows what the alias stands for.

Supported

Type aliases

A type spelled through an alias shows what it stands for, as "Alias is int"

With show_aka = false the card keeps the alias alone.

Supportedclangd#2020

Aliases of structs

An alias names the struct it stands for and shows its members

Supportedclangd#2219

C anonymous struct typedefs

In C, a struct named only by its typedef shows under the typedef's name, as typedef struct { ... } Point

Deduced Types ​

auto and decltype show the type they stand for.

Supported

auto

Hovering auto shows the type it stands for, in a template as the template would write it

A type only instantiation can work out, such as that of value + 1, is not deduced.

Supported

decltype

Hovering decltype shows the type it yields, the reference a parenthesized name adds included

Supported

auto through an alias

An auto deduced from an alias keeps the alias's name beside what it stands for

Generic lambda parameters

A generic lambda's auto parameter is the type the lambda is called with, and the parameter's members have cards

Inside the body the parameter reads as the type of the call, and point.x is the member of that type. A lambda called with several types keeps its parameter auto.

Supported

Library aliases

The type of a variable keeps the alias its initializer names, but not a trait's result or one the library keeps to itself

values.size() reads as std::vector<int>::size_type with what it stands for after it; the member alias of __alloc_traits that front() returns reads as int&, and a trait's result, invoke_result_t<…>, as what it computes. An alias over a class the library keeps to itself names that class after it: std::vector<int>::iterator is __gnu_cxx::__normal_iterator<int*, std::vector<int>>. A binding of such a class takes the alias from its initializer: position of ids.insert(1) is a std::set<int>::iterator.

Templates ​

A template parameter shows its kind and default, and a use of a template the arguments it is instantiated with.

Supported

Template parameters

A template parameter shows its kind, a type, a template or a value, with its default

Supported

Template arguments

A use of a template shows the template and the arguments it is instantiated with

Supportedclangd#435

Deduced class arguments

A declaration that deduces its class template arguments shows them, at the class name and at the variable

Supported

Concept constraints

A concept and a constrained parameter show the constraint; an Addable auto placeholder shows the type it deduces

Supported

Members through a dependent specialization

A member of a class template reached through a dependent specialization of it reads the arguments the code names it with

Over lib::vector<Point<T>>, push_back belongs to lib::vector<Point<T>> and its value_type is Point<T>, not the template's own _Tp; the second of the pair<const int, T> a map<int, T> finds is a T.

Supported

Instantiation patterns

A use of an instantiation shows the template it was instantiated from, with the arguments it binds

A partial specialization shows itself, and a member of a class template its class's arguments first. Arguments a default gives and empty packs are left out; an explicit specialization shows as it is written.

Layout ​

Fields and classes show their size, alignment and padding as the compiler lays them out, wherever they are hovered.

Supported

Field layout

A field shows its offset, size and alignment, and the padding after it

layout is on by default; false leaves these facts out, a class's size too.

Supportedclangd#1763

Type layout

A class shows its size and alignment, and how much of the size is padding

Call Arguments ​

An argument at a call shows the parameter it is passed to, and how it is passed.

Supported

Call arguments

An argument at a call shows the parameter it is passed as

Supported

Pass modes

An argument's card says whether it is passed by value, by reference or by const reference

Supported

Implicit conversions

An argument converted on its way to the parameter names the type it is converted to

Supportedclangd#1622

Record arguments

A record passed to a call evaluated at compile time does not take the call's value as its own

Expressions ​

A number shows its type and value, a string its type, length and size, and this the type it points to.

Literals

A number shows its type and value, a string its type, length and size

The length leaves the terminating null out; the size counts it.

Supported

this

Hovering this shows the type it points to, in a class and in a class template

Macros ​

A macro shows its #define, and a use of it what it expands to.

Supportedclangd#2642

Use before definition

A macro name used above its own #define shows that definition and the line it is on

Supported

Every site of a macro

The definition, a use, #ifdef, defined and #undef all show the macro's #define

Supported

Expansion preview

A use of a function-like macro shows what it expands to with its arguments

Supported

Command-line macros

A macro defined with -D shows the #define it amounts to

Supported

Macros in arguments

A macro inside another macro's arguments shows its definition and what it expands to there

Supported

Expansion values

A use of a macro that expands to an expression shows its type, and its value when it is a constant

Include Directives ​

An #include shows the file it resolves to.

Supported

Include directives

Hovering an #include shows the file it resolves to

Documentation ​

A declaration's documentation comment shows in its card, wherever the symbol is hovered. The comment is read the way Doxygen reads it — its commands, and the Markdown it is written in — and completion, signature help and clice query read it the same way.

Supported

Documentation comments

A declaration's /// comment shows in its card, at the declaration and at every use

A use of a template shows the comment of the specialization it picks.

Supported

Getters and setters

A trivial getter or setter without a comment of its own is described as accessing its field

Supportedclangd#1320

@copydoc

A @copydoc command shows the documentation of what it names

Supportedclangd#2504

Overrides

An override without a comment of its own shows the documentation of the method it overrides

Supportedclangd#2506

Overloads

An overload without a comment of its own shows none, whatever its neighbours say

Different overloads often do different things, so an undocumented one does not borrow the comment of the overload before it.

Supportedclangd#1936

Inherited constructors

The name in using Base::Base shows the constructor it inherits, with its documentation

Supportedclangd#974

Banner comments

A section banner a blank line separates from a declaration is not its documentation

Supported

Declaration and definition

The declaration's /// comment shows at the declaration and at the definition

The definition's plain // comment does not take its place, whichever of the two is hovered first.

Supportedclangd#2057

Markdown tables

A table in a comment shows as a table

Supportedclangd#1040

Indented blocks

An indented block in a comment keeps its indentation and the blank line before it

Supportedclangd#2148

Stray comments

A plain comment a blank line separates from a declaration is not its documentation

A /// or /** */ comment documents the declaration below it even across a blank line, as Doxygen reads it.

Supportedclangd#2662

GTK-Doc comments

GTK-Doc's name line goes, and each @parameter: entry shows beside its parameter

Supported

Formulas

A Doxygen formula shows as code, without its @f$ markers

Supported

Doxygen commands

@brief heads the card, and each @param, @return and @retval shows beside what it describes

Supported

Parameter documentation

A parameter's card shows what its function's @param or its template's @tparam says of it

Supportedclangd#782

Macro documentation

A macro's documentation comment shows in its card

Supported

Trailing comments

A ///< comment after a field, an enumerator or a variable on its line documents it; any other comment there does when no comment above documents it

Supported

Comments as written

The plain format shows a comment as written, its commands and markup included

Supported

System headers

A declaration in a system header shows its documentation comment too

Modules ​

A module name shows the comment above its interface unit's module declaration and that unit's file, and a declaration from a module shows whether it is exported and the documentation its interface gives it.

Supported

Module names

A module name shows the comment above its interface unit's module declaration and the file of that unit, in an import and in the module declaration

Supported

Exported declarations

A declaration of a module interface reads export when the module exports it

Supported

Documented exports

A symbol imported from a module shows the documentation written in its interface

Attributes ​

An attribute's card shows how the code writes it and what it means.

Supportedclangd#1862

Attributes

Hovering an attribute shows clang's description of it, for GNU and standard spellings

Nothing to Show ​

Where there is nothing worth a card, none appears.

Supported

Nothing to show

A builtin type, a keyword like const or virtual, or the inside of an empty body shows no card

Presentation ​

A card is markdown, or plain text for an editor that cannot show markdown.

Supported

Plain text cards

Cards are markdown, or plain text for editors that cannot show markdown

An editor says which it can show when it starts, and the card follows.

Supported

Types read left to right

A type C++ writes inside out reads left to right: *, & and [N] follow what they apply to, a function reads (params) -> R, a member pointer C::-> T

A function inside a function, or a member pointer inside a member pointer, is named by a Greek letter, spelled on the line below.

Supported

Long types

A type too long for one line is written in lines of at most 60 columns

A part that does not fit is named by a Greek letter and spelled on its own line below, two columns further in; a part written twice shares its letter. A list of arguments or parameters that still does not fit wraps, its lines aligned after the bracket opening it.

Supported

The file's style

The code a card shows, a declaration or what a macro expands to, is laid out in the style of the .clang-format above the file

Without one, it is laid out in the LLVM style with * and & beside the type.