Get inlay hints in source editor for AL method parameters and return types

Important

This content is archived and is not being updated. For the latest documentation, go to What's new or changed in Business Central. For the latest release plans, go to Dynamics 365, Power Platform, and Cloud for Industry release plans.

Enabled for Public preview General availability
Admins, makers, marketers, or analysts, automatically Aug 13, 2023 Oct 2, 2023

Business value

Visual Studio Code supports an editor concept called inlay hints. These add additional inline information to source code to help you understand what the code does. In this release we're adding the ability to get inlay hints for AL parameter names and return types.

Feature details

Visual Studio Code supports inlay hints, which render additional information about the source inline. More information: Inlay Hints

With this release we're adding inlay hints for AL parameter names and method return types.

Here's an example of inlay hints enabled for both return type and parameters (these are the grey names):

Example of inlay hints for return type and parameters

By default, neither of these inlay hints is shown, but with the new al.inlayhints settings you can enable each individually.

New al.inlayhints settings allow enabled inlay hints for return types and parameters

Note that even though you have AL inlay hints enabled, you also need to enable the inlay hints feature itself in Visual Studio Code, because it's not enabled by default. You can do that with the general "editor.inlayHintsEnabled" setting. You can decide whether you want the hints always on or off, or shown/hidden using the Ctrl+Alt keyboard shortcut.

Enable inlay hints with the editor.inlayHints.enabled setting

You can even control the appearance of the inlay hints in the Visual Studio Code settings.

Control rendering of inlay hints with the editor.inlayHints settings for font, size and padding

Tell us what you think

Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.

See also

AL Language extension configuration (docs)