mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
![Sean McManus](/assets/img/avatar_default.png)
This fixes the issue at https://github.com/microsoft/vscode-cpptools/issues/12249 .
This was removed in 98fa77a679
.
Then PR https://github.com/microsoft/vscode/pull/160357 added /* */ autoClosingPair.
47 lines
1.2 KiB
JSON
47 lines
1.2 KiB
JSON
{
|
|
"comments": {
|
|
"lineComment": "//",
|
|
"blockComment": ["/*", "*/"]
|
|
},
|
|
"brackets": [
|
|
["{", "}"],
|
|
["[", "]"],
|
|
["(", ")"]
|
|
],
|
|
"autoClosingPairs": [
|
|
{ "open": "[", "close": "]" },
|
|
{ "open": "{", "close": "}" },
|
|
{ "open": "(", "close": ")" },
|
|
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
|
|
{ "open": "\"", "close": "\"", "notIn": ["string"] },
|
|
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] },
|
|
{ "open": "/**", "close": " */", "notIn": ["string"] }
|
|
],
|
|
"surroundingPairs": [
|
|
["{", "}"],
|
|
["[", "]"],
|
|
["(", ")"],
|
|
["\"", "\""],
|
|
["'", "'"],
|
|
["<", ">"]
|
|
],
|
|
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
|
|
"folding": {
|
|
"markers": {
|
|
"start": "^\\s*#pragma\\s+region\\b",
|
|
"end": "^\\s*#pragma\\s+endregion\\b"
|
|
}
|
|
},
|
|
"onEnterRules": [
|
|
{
|
|
// Decrease indentation after single line if/else if/else, for, or while
|
|
"previousLineText": "^\\s*(((else ?)?if|for|while)\\s*\\(.*\\)\\s*|else\\s*)$",
|
|
// But make sure line doesn't have braces or is not another if statement
|
|
"beforeText": "^\\s+([^{i\\s]|i(?!f\\b))",
|
|
"action": {
|
|
"indent": "outdent"
|
|
}
|
|
}
|
|
]
|
|
}
|