Dynamics 365 Business Central: Snippet Suggestions (Controls whether snippets are shown with other suggestions and how they are sorted)

Dynamics 365 Business Central

Hi, Readers.
Today I would like to share another mini tip about Business Central, Snippet Suggestions.
I recently learned from David Feldhoff 😁.

VS Code IntelliSense features are powered by a language service. A language service provides intelligent code completions based on language semantics and an analysis of your source code. If a language service knows possible completions, the IntelliSense suggestions will pop up as you type. If you continue typing characters, the list of members (variables, methods, etc.) is filtered to only include members containing your typed characters. Pressing Tab or Enter will insert the selected member.

You can trigger IntelliSense in any editor window by typing Ctrl+Space.

Or by typing a trigger character (such as the dot character (.) in AL language).

In addition to the inline help of IntelliSense, you have access to various snippets that’ll give you a template for a specific object type.

Use a code snippet from an .al file by start typing the snippet name. All snippets start with the letter t. More details: AL Snippets

A small inconvenience occurs here. In IntelliSense, it is sorted alphabetically by default, so there is a possibility of a confusing display like the one below. (Of course, if you’re used to it, it’s not a big deal)

And, this was also mentioned when we discussed IntelliSense indicator for temporary tables and IntelliSense suggestion for enum ordinal value.

So, can we change this behavior? Yes. There’s a setting here, Snippet Suggestions.

Snippet Suggestions
Controls whether snippets are shown with other suggestions and how they are sorted.

And in settings.json file.

Let’s see more details.

  • top: Show snippet suggestions on top of other suggestions.
  • bottom: Show snippet suggestions below other suggestions.
  • inline: Show snippets suggestions with other suggestions. (Default)
  • none: Do not show snippet suggestions.

I personally suggest the same as David Feldhoff, set to bottom will look more concise😁. Give it a try!!!

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL