Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/java/language-configuration.json
3311 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
"{",
26
"}"
27
],
28
[
29
"[",
30
"]"
31
],
32
[
33
"(",
34
")"
35
],
36
{
37
"open": "\"",
38
"close": "\"",
39
"notIn": [
40
"string"
41
]
42
},
43
{
44
"open": "'",
45
"close": "'",
46
"notIn": [
47
"string"
48
]
49
},
50
{
51
"open": "/**",
52
"close": " */",
53
"notIn": [
54
"string"
55
]
56
}
57
],
58
"surroundingPairs": [
59
[
60
"{",
61
"}"
62
],
63
[
64
"[",
65
"]"
66
],
67
[
68
"(",
69
")"
70
],
71
[
72
"\"",
73
"\""
74
],
75
[
76
"'",
77
"'"
78
],
79
[
80
"<",
81
">"
82
]
83
],
84
"folding": {
85
"markers": {
86
"start": "^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))",
87
"end": "^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))"
88
}
89
},
90
"onEnterRules": [
91
{
92
// e.g. /** | */
93
"beforeText": {
94
"pattern": "^\\s*/\\*\\*(?!/)([^\\*]|\\*(?!/))*$"
95
},
96
"afterText": {
97
"pattern": "^\\s*\\*/$"
98
},
99
"action": {
100
"indent": "indentOutdent",
101
"appendText": " * "
102
}
103
},
104
{
105
// e.g. /** ...|
106
"beforeText": {
107
"pattern": "^\\s*/\\*\\*(?!/)([^\\*]|\\*(?!/))*$"
108
},
109
"action": {
110
"indent": "none",
111
"appendText": " * "
112
}
113
},
114
{
115
// e.g. * ...|
116
"beforeText": {
117
"pattern": "^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$"
118
},
119
"previousLineText": {
120
"pattern": "(?=^(\\s*(/\\*\\*|\\*)).*)(?=(?!(\\s*\\*/)))"
121
},
122
"action": {
123
"indent": "none",
124
"appendText": "* "
125
}
126
},
127
{
128
// e.g. */|
129
"beforeText": {
130
"pattern": "^(\\t|[ ])*[ ]\\*/\\s*$"
131
},
132
"action": {
133
"indent": "none",
134
"removeText": 1
135
}
136
},
137
{
138
// e.g. *-----*/|
139
"beforeText": {
140
"pattern": "^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$"
141
},
142
"action": {
143
"indent": "none",
144
"removeText": 1
145
}
146
},
147
{
148
"beforeText": {
149
"pattern": "^\\s*(\\bcase\\s.+:|\\bdefault:)$"
150
},
151
"afterText": {
152
"pattern": "^(?!\\s*(\\bcase\\b|\\bdefault\\b))"
153
},
154
"action": {
155
"indent": "indent"
156
}
157
},
158
// Add // when pressing enter from inside line comment
159
{
160
"beforeText": {
161
"pattern": "\/\/.*"
162
},
163
"afterText": {
164
"pattern": "^(?!\\s*$).+"
165
},
166
"action": {
167
"indent": "none",
168
"appendText": "// "
169
}
170
},
171
]
172
}
173
174