Skip to content

4.1 | Declarative language features

Rácz Zalán edited this page Nov 25, 2023 · 2 revisions

Language configuration

The language configuration is stored in the language-configuration.json file and these are features that don't require running code on our side.

Comments

The comments property lets VS Code know, what single-line and multiline comments look like so that the user can comment out lines with a shortcut.

Brackets

The brackets property makes VS Code color the corresponding brackets with the same color.

Auto-closing pairs

The autoClosingPairs property makes VS Code paste the 2nd element of the pair if the user types the first element.

Surrounding pairs

The surroundingPairs property makes VS Code surround the selected code with the pair if the user types the first element of the pair.

Snippets

The code snippets are stored in the snippets.json file. It contains small code snippets for code completion. Snippets usually contain placeholders, like ${1:int}, that the user can change. If the placeholder's id is repeated multiple times in the snippet, the user can change the value in all appearances at once. Placeholder $0 is special, because it indicates the cursor's position after the snippet generation.

Useful resources

Clone this wiki locally