Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/cpp/language-configuration.json
3309 views
1
{
2
"comments": {
3
"lineComment": "//",
4
"blockComment": [
5
"/*",
6
"*/"
7
]
8
},
9
"brackets": [
10
[
11
"{",
12
"}"
13
],
14
[
15
"[",
16
"]"
17
],
18
[
19
"(",
20
")"
21
]
22
],
23
"autoClosingPairs": [
24
{
25
"open": "[",
26
"close": "]"
27
},
28
{
29
"open": "{",
30
"close": "}"
31
},
32
{
33
"open": "(",
34
"close": ")"
35
},
36
{
37
"open": "'",
38
"close": "'",
39
"notIn": [
40
"string",
41
"comment"
42
]
43
},
44
{
45
"open": "\"",
46
"close": "\"",
47
"notIn": [
48
"string"
49
]
50
},
51
{
52
"open": "/*",
53
"close": "*/",
54
"notIn": [
55
"string",
56
"comment"
57
]
58
},
59
{
60
"open": "/**",
61
"close": " */",
62
"notIn": [
63
"string"
64
]
65
}
66
],
67
"surroundingPairs": [
68
[
69
"{",
70
"}"
71
],
72
[
73
"[",
74
"]"
75
],
76
[
77
"(",
78
")"
79
],
80
[
81
"\"",
82
"\""
83
],
84
[
85
"'",
86
"'"
87
],
88
[
89
"<",
90
">"
91
]
92
],
93
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
94
"folding": {
95
"markers": {
96
"start": "^\\s*#pragma\\s+region\\b",
97
"end": "^\\s*#pragma\\s+endregion\\b"
98
}
99
},
100
"indentationRules": {
101
"decreaseIndentPattern": {
102
"pattern": "^\\s*[\\}\\]\\)].*$"
103
},
104
"increaseIndentPattern": {
105
"pattern": "^.*(\\{[^}]*|\\([^)]*|\\[[^\\]]*)$"
106
},
107
},
108
"onEnterRules": [
109
{
110
// Decrease indentation after single line if/else if/else, for, or while
111
"previousLineText": "^\\s*(((else ?)?if|for|while)\\s*\\(.*\\)\\s*|else\\s*)$",
112
// But make sure line doesn't have braces or is not another if statement
113
"beforeText": "^\\s+([^{i\\s]|i(?!f\\b))",
114
"action": {
115
"indent": "outdent"
116
}
117
},
118
// Add // when pressing enter from inside line comment
119
{
120
"beforeText": {
121
"pattern": "\/\/.*"
122
},
123
"afterText": {
124
"pattern": "^(?!\\s*$).+"
125
},
126
"action": {
127
"indent": "none",
128
"appendText": "// "
129
}
130
},
131
]
132
}
133
134