void/extensions/cpp/language-configuration.json

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

133 lines
1.8 KiB
JSON
Raw Permalink Normal View History

2024-09-11 02:37:36 +00:00
{
"comments": {
"lineComment": "//",
2025-03-01 02:01:53 +00:00
"blockComment": [
"/*",
"*/"
]
2024-09-11 02:37:36 +00:00
},
"brackets": [
2025-03-01 02:01:53 +00:00
[
"{",
"}"
],
[
"[",
"]"
],
[
"(",
")"
]
2024-09-11 02:37:36 +00:00
],
"autoClosingPairs": [
2025-03-01 02:01:53 +00:00
{
"open": "[",
"close": "]"
},
{
"open": "{",
"close": "}"
},
{
"open": "(",
"close": ")"
},
{
"open": "'",
"close": "'",
"notIn": [
"string",
"comment"
]
},
{
"open": "\"",
"close": "\"",
"notIn": [
"string"
]
},
{
"open": "/*",
"close": "*/",
"notIn": [
"string",
"comment"
]
},
{
"open": "/**",
"close": " */",
"notIn": [
"string"
]
}
2024-09-11 02:37:36 +00:00
],
"surroundingPairs": [
2025-03-01 02:01:53 +00:00
[
"{",
"}"
],
[
"[",
"]"
],
[
"(",
")"
],
[
"\"",
"\""
],
[
"'",
"'"
],
[
"<",
">"
]
2024-09-11 02:37:36 +00:00
],
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
"folding": {
"markers": {
"start": "^\\s*#pragma\\s+region\\b",
"end": "^\\s*#pragma\\s+endregion\\b"
}
},
2025-03-01 02:01:53 +00:00
"indentationRules": {
"decreaseIndentPattern": {
"pattern": "^\\s*[\\}\\]\\)].*$"
},
"increaseIndentPattern": {
"pattern": "^.*(\\{[^}]*|\\([^)]*|\\[[^\\]]*)$"
},
},
2024-09-11 02:37:36 +00:00
"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"
}
2025-03-01 02:01:53 +00:00
},
// Add // when pressing enter from inside line comment
{
"beforeText": {
"pattern": "\/\/.*"
},
"afterText": {
"pattern": "^(?!\\s*$).+"
},
"action": {
"indent": "none",
"appendText": "// "
}
},
2024-09-11 02:37:36 +00:00
]
}