Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions api/language-extensions/language-configuration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Here is a [Language Configuration sample](https://github.com/microsoft/vscode-ex
```json
{
"comments": {
"lineComment": "//",
"lineComment": { "comment": "//" },
"blockComment": ["/*", "*/"]
},
"brackets": [["{", "}"], ["[", "]"], ["(", ")"]],
Expand Down Expand Up @@ -64,17 +64,27 @@ Here is a [Language Configuration sample](https://github.com/microsoft/vscode-ex

## Comment toggling

VS Code offers two commands for comment toggling. **Toggle Line Comment** and **Toggle Block Comment**. You can specify `comments.blockComment` and `comments.lineComment` to control how VS Code should comment out lines / blocks.
VS Code offers two commands for comment toggling. **Toggle Line Comment** and **Toggle Block Comment**. You can specify `comments.blockComment` and `comments.lineComment` to control how VS Code should comment out lines / blocks. The `lineComment` property uses an object with a required `comment` field and an optional `noIndent` field.

```json
{
"comments": {
"lineComment": "//",
"lineComment": { "comment": "//" },
"blockComment": ["/*", "*/"]
}
}
```

If your language requires line comments to stay in the first column, set `noIndent` to `true`:

```json
{
"comments": {
"lineComment": { "comment": "#", "noIndent": true }
}
}
```

## Brackets definition

When you move the cursor to a bracket defined here, VS Code will highlight that bracket together with its matching pair.
Expand Down