Skip to content

Hover ​

Rich information cards for the symbol under the cursor.

Symbol Information ​

Supported

Qualified name

The hover card shows the enclosing namespace and class scope

Supported

Symbol kind

The card names what the symbol is: struct, enum, function, field, …

Supported

Access specifier

Members show their public / protected / private access

Supported

Definition rendering

The card includes the symbol's source definition

Supportedclangd#710

Initializer truncation

Huge initializers render truncated, not in full

The rendered definition omits the initializer, and the evaluated Value field shows the first ten of its 256 elements.

Virtual modifiers

virtual / override / final show on method hover

Modifiers written in the source render (virtual … = 0, override, final), but an overriding method that omits the redundant virtual keyword gives no sign of its virtuality — the card lacks the virtual void draw() override form the issue asks for.

Partialclangd#436

Anonymous namespace scope

(anonymous namespace) shows in the scope display

The cards render, but the anonymous segment is dropped from the scope display: a top-level anonymous member shows no scope line at all, and outer::(anonymous) shows just outer.

Type Information ​

Supported

Variable types

Variable hover preserves pointer, reference and array declarators

A variable's card pretty-prints its declared type, spelling the pointer, reference and array declarators the way they read in source.

Supported

Type aliases

Hover can show the desugared aka form

A sugared type shows its underlying type as Alias (aka int). The show_aka option turns the aka suffix off.

Supported

Function signatures

Function hover reports return types, parameter names and defaults

A function's card lists its return type, each parameter with its name, and any default argument.

Supported

Template parameters

Template hover distinguishes type, template-template and non-type parameters

Each template parameter kind reports its form: a type parameter, a template-template parameter, and a non-type parameter with its default.

Supported

auto deduction

Placeholder hover shows the type it resolves to

Hovering an auto placeholder shows the type substituted for it — builtins, pointers, lambdas, template instantiations, and the /* not deduced */ marker inside an uninstantiated template.

Supported

decltype deduction

Decltype hover distinguishes value, reference and dependent forms

Hovering a decltype or decltype(auto) placeholder shows the resolved type, including the reference the parenthesized-expression rule adds.

Partialclangd#435

CTAD

Class placeholder hover shows its deduced template arguments

With class template argument deduction the variable's card shows the deduced Box<int>, but hovering the class-name spelling still reports the primary template without its arguments.

Partialclangd#230

Instantiation arguments

Template use hover does not show parameter-to-argument bindings yet

A use of a template shows the substituted types (Wrapper<int>, identity<int>, int x), but not an explicit T = int mapping of each parameter to the argument it was bound to.

Unsupportedclangd#493

Lambda auto parameters

Generic lambda parameters do not show their deduced type yet

Hovering the auto parameter of a generic lambda yields no card; the deduced parameter type is not shown.

Supported

Sugared auto

Alias spelling survives auto deduction

Hover keeps the alias spelling and appends its desugared form, so auto deduced from an aliased return type reads as Outer // aka: int.

Unsupportedclangd#2156

Type formatting

Long and nested rendered types are not rewrapped or aligned

Long or nested types are not rewrapped or aligned.

Supportedclangd#2219

Anonymous struct typedef

C typedef hover names an anonymous struct after its alias

Both the alias and a variable of it report a clean Point card rather than presenting the anonymous type as a separately named struct.

Partial

Concept constraints

Constrained placeholders lose their constraint on hover

The constrained-parameter and concept-reference cards carry the constraint, but hovering the placeholder of a constrained Addable auto variable shows only the deduced type — the constraint is dropped.

Layout Information ​

Supported

Field layout

Size, offset, alignment and padding show on field hover

Type-level layout

Hovering the type itself shows its size, alignment and padding

Size and alignment show on the type card today; the total padding does not yet.

Vtable offset

Virtual methods show their table slot

The method card renders without any vtable fact today.

Expression Context ​

Supported

Constant evaluation

Constant-expression hover reports evaluated values

When an initializer is a constant expression, the card evaluates it and shows the resulting value.

Supported

Call arguments

Argument hover identifies its bound parameter

Hovering an argument at a call site shows the parameter it is passed to, naming the parameter it binds.

Supported

Pass semantics

Argument hover distinguishes value and reference passing

The argument card states how the value reaches the callee: copied by value, or bound to a mutable or const reference parameter.

Supported

Implicit conversions

Argument hover reports the target type of an implicit conversion

When an argument reaches a parameter through an implicit conversion, the card notes the target type, for both built-in and user-defined conversions.

String literals

String-literal hover reports its size in bytes

A string-literal card reports the array type and its size in bytes (const char[6], Size: 6 bytes — the length plus the null terminator), not an explicit character count.

Unsupportedclangd#1669

Numeric literals

Numeric literals have no type or value hover yet

Hovering a numeric literal yields no card, unlike character and string literals, whose type and value are shown.

Record variables

Record hover can show a misleading enclosing constant value

Hovering a record-typed argument of a constant-evaluable call currently reports that call's value (Value = 7) on the variable — a value that is not the record's own.

Documentation ​

Supported

Doxygen /// comments

Declaration documentation appears on hover

Applies to plain functions, primary templates and their specializations; a reference resolves to the most specialized declaration's comment.

Supported

Synthesized accessor docs

Trivial getters/setters get a generated one-line description

A trivial getter or setter with no comment of its own gets a synthesized "Trivial accessor/setter for field." line in its hover card.

@copydoc tags

Copied documentation is not resolved onto the receiving symbol yet

A @copydoc target tag remains literal instead of copying target's documentation into this symbol's hover card.

Inherited override docs

An override with no comment does not inherit the base method's documentation yet

An overriding method with no comment of its own has no description on its hover card.

Overload doc sharing

A later overload does not reuse the first overload's documentation yet

Consecutive overloads often document only the first; a later undocumented overload has no description on its hover card.

Unsupportedclangd#1936

Inherited constructor docs

Inherited constructors have no documentation hover yet

The name in a using Base::Base; declaration resolves to the class rather than an inherited constructor, so the base constructor's documentation has no hover surface.

Partialclangd#974

Banner comments

A separated section banner still attaches to the following declaration

A // ==== Section ==== banner followed by a blank line is misattributed as documentation for the declaration below it, so the banner text appears in the card.

Supported

Declaration vs definition comments

The declaration's doc wins over a definition-site comment

The declaration's /// documentation appears at both the declaration and definition sites instead of the definition's plain // note.

Whitespace and newlines

Markdown tables in comments lose their line breaks on hover

A markdown table written across several /// lines is flattened onto one line, so the table does not render.

Comment indentation

Indented documentation blocks lose their leading indentation on hover

A doc comment whose body contains an indented block loses the block's offset, and its blank line collapses.

Template keyword from a macro

Documentation on a macro-produced template is missing from hover

When the template keyword is produced by a macro expansion, the declaration's doc comment does not appear on hover, and the card carries no description.

Unsupportedclangd#2148

Comment suppression option

Misattributed documentation cannot be suppressed by configuration yet

A stray comment such as a section banner separated from the code by a blank line always reaches the hover card, and no option suppresses it.

Macro Hover ​

Supported

Definition text at every site

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

A macro's hover card carries its #define text wherever the name appears: the definition itself, a use, an #ifdef guard, a defined test and an #undef.

Supported

Fully-expanded preview

A function-like macro use shows its arguments substituted through the body

Hovering a function-like macro invocation shows the #define text and a preview of the fully-expanded result with the call's arguments spliced in.

Supported

Command-line macros

-D definitions hover with a synthesized #define

A macro defined on the command line (-DFROM_CLI=7) shows a synthesized #define FROM_CLI 7 in its hover card, then its expansion.

Partial

Nested macro in arguments

A nested macro argument shows its definition without an expansion preview

The expansion preview starts at the outer invocation, so hovering an inner macro named inside the arguments shows only its definition, not an expansion preview.

Use before definition

A macro use before its definition has no hover yet

A macro name used in an #if above its own #define has no hover, while a use after the definition works normally.

Unsupported

#define inside the preamble

A leading macro definition has no hover card

A #define in the leading run of directives before the first declaration has no hover card, while definitions after a declaration do.

Special Hover Targets ​

Partialclangd#959

Members on type hover

Hovering an enum or struct type lists its members

The card names the type (and a struct's layout), but the member list is not expanded — the body renders as {}.

Typedef underlying struct

Hovering an alias expands the aliased definition

The card resolves the alias to its underlying type name, but does not expand that struct's definition or member list.

Unsupportedclangd#1862

Keyword documentation

Language keywords do not have documentation hover yet

Hovering a keyword such as const or virtual produces no card.

Supportedclangd#1862

Attribute documentation

Hovering an attribute shows its description

The attribute's own documentation renders in the card, for both GNU __attribute__ spellings and C++ [[...]] attributes.

Supported

Include directive hover

Hovering an #include shows the resolved header path

The card resolves the quoted header to its file on disk.

Supported

this expression

Hovering this shows the pointed-to class type

Works in a plain class and inside a class template.

Supported

Predefined identifiers

__func__ hover shows the current function name

The value resolves in a concrete function; inside a template only the approximate type is known.

Supported

No hover on meaningless tokens

Builtin keywords and empty bodies yield no card

Hovering a builtin type keyword or the inside of an empty body produces no card at all, so editors show nothing rather than noise. (Numeric and bool literals also have no card today, but that is a tracked gap — see the numeric-literal item — not a promise.)

Unsupportedclangd#2662

GTK-Doc and kernel-doc

GObject Introspection annotations do not appear in hover cards yet

GTK-Doc / kernel-doc comment syntax and GObject Introspection annotations are not parsed into the hover card.

Unsupportedclangd#2669

LaTeX math in Doxygen

Inline Doxygen formulas are not rendered as math

The formula text is not rendered as math.

Presentation ​

Supported

Markdown rendering

Cards render as markdown, or plain text via parse_comment_as_markdown = false

Unsupported

Import statement hover

Hovering import does not describe the imported module yet

Hovering an import declaration does not yet describe the imported module.

Supported

Module name hover

Hovering a module name shows the interface unit that defines it

The card names the module and the file of its interface unit, on the name in an import and in the module declaration alike.

Supported

Export status hover

The card of a module's declaration shows whether the module exports it

An exported declaration's definition reads export, whether exported on its own or in an export block; a declaration the module keeps to itself, or a member of an exported class, does not.

Hover Correctness ​

Robustness on inputs that have broken other tooling.

Supported

MSVC inheritance model

MSVC inheritance model attributes do not alter record hover

Under an MSVC target, the implicit inheritance attribute does not leak into the record or method card.

Supported

Most-vexing-parse

Direct initialization and a function declaration have distinct hover cards

The direct initialization appears as a variable, while the most-vexing form appears as a function declaration.

Supported

Large unsigned enum constant

Hovering a 0xFFFF...ULL enumerator does not crash

The card renders the full unsigned value without overflowing or failing.

Supported

Call with default arguments

Hovering a call that omits defaults does not crash

The call card renders the callee signature with its default arguments.

Supported

Macro-shadowed symbol

A function-like macro shadows a same-named function at the call site

The card shows the active macro and its expansion instead of the shadowed function.