11{
2- "comments" : {
3- // symbol used for single line comment. Remove this entry if your language does not support line comments
4- "lineComment" : " //" ,
5- // symbols used for start and end a block comment. Remove this entry if your language does not support block comments
6- "blockComment" : [ " /*" , " */" ]
7- },
8- // symbols used as brackets
9- "brackets" : [
10- [" {" , " }" ],
11- [" [" , " ]" ],
12- [" (" , " )" ]
13- ],
14- // symbols that are auto closed when typing
15- "autoClosingPairs" : [
16- [" {" , " }" ],
17- [" [" , " ]" ],
18- [" (" , " )" ],
19- [" \" " , " \" " ],
20- [" '" , " '" ],
21- [" `" , " `" ]
22- ],
23- // symbols that can be used to surround a selection
24- "surroundingPairs" : [
25- [" {" , " }" ],
26- [" [" , " ]" ],
27- [" (" , " )" ],
28- [" \" " , " \" " ],
29- [" '" , " '" ],
30- [" `" , " `" ]
31- ]
2+ // Note that this file should stay in sync with 'javascript-language-basics/javascript-language-configuration.json'
3+ "comments" : {
4+ "lineComment" : " //" ,
5+ "blockComment" : [
6+ " /*" ,
7+ " */"
8+ ]
9+ },
10+ "brackets" : [
11+ [
12+ " ${" ,
13+ " }"
14+ ],
15+ [
16+ " {" ,
17+ " }"
18+ ],
19+ [
20+ " [" ,
21+ " ]"
22+ ],
23+ [
24+ " (" ,
25+ " )"
26+ ]
27+ ],
28+ "autoClosingPairs" : [
29+ {
30+ "open" : " {" ,
31+ "close" : " }"
32+ },
33+ {
34+ "open" : " [" ,
35+ "close" : " ]"
36+ },
37+ {
38+ "open" : " (" ,
39+ "close" : " )"
40+ },
41+ {
42+ "open" : " '" ,
43+ "close" : " '" ,
44+ "notIn" : [
45+ " string" ,
46+ " comment"
47+ ]
48+ },
49+ {
50+ "open" : " \" " ,
51+ "close" : " \" " ,
52+ "notIn" : [
53+ " string"
54+ ]
55+ },
56+ {
57+ "open" : " `" ,
58+ "close" : " `" ,
59+ "notIn" : [
60+ " string" ,
61+ " comment"
62+ ]
63+ },
64+ {
65+ "open" : " /**" ,
66+ "close" : " */" ,
67+ "notIn" : [
68+ " string"
69+ ]
70+ }
71+ ],
72+ "surroundingPairs" : [
73+ [
74+ " {" ,
75+ " }"
76+ ],
77+ [
78+ " [" ,
79+ " ]"
80+ ],
81+ [
82+ " (" ,
83+ " )"
84+ ],
85+ [
86+ " '" ,
87+ " '"
88+ ],
89+ [
90+ " \" " ,
91+ " \" "
92+ ],
93+ [
94+ " `" ,
95+ " `"
96+ ],
97+ [
98+ " <" ,
99+ " >"
100+ ]
101+ ],
102+ "colorizedBracketPairs" : [
103+ [
104+ " (" ,
105+ " )"
106+ ],
107+ [
108+ " [" ,
109+ " ]"
110+ ],
111+ [
112+ " {" ,
113+ " }"
114+ ],
115+ [
116+ " <" ,
117+ " >"
118+ ]
119+ ],
120+ "autoCloseBefore" : " ;:.,=}])>` \n\t " ,
121+ "folding" : {
122+ "markers" : {
123+ "start" : " ^\\ s*//\\ s*#?region\\ b" ,
124+ "end" : " ^\\ s*//\\ s*#?endregion\\ b"
125+ }
126+ },
127+ "wordPattern" : {
128+ "pattern" : " (-?\\ d*\\ .\\ d\\ w*)|([^\\ `\\ ~\\ !\\ %\\ ^\\ &\\ *\\ (\\ )\\ -\\ =\\ +\\ [\\ {\\ ]\\ }\\\\\\ |\\ ;\\ :\\ '\\\"\\ ,\\ .\\ <\\ >/\\ ?\\ s]+)" ,
129+ },
130+ "indentationRules" : {
131+ "decreaseIndentPattern" : {
132+ "pattern" : " ^((?!.*?/\\ *).*\\ *\/ )?\\ s*[\\ }\\ ]].*$"
133+ },
134+ "increaseIndentPattern" : {
135+ "pattern" : " ^((?!//).)*(\\ {([^}\" '`/]*|(\\ t|[ ])*//.*)|\\ ([^)\" '`/]*|\\ [[^\\ ]\" '`/]*)$"
136+ },
137+ // e.g. * ...| or */| or *-----*/|
138+ "unIndentedLinePattern" : {
139+ "pattern" : " ^(\\ t|[ ])*[ ]\\ *[^/]*\\ */\\ s*$|^(\\ t|[ ])*[ ]\\ */\\ s*$|^(\\ t|[ ])*[ ]\\ *([ ]([^\\ *]|\\ *(?!/))*)?$"
140+ }
141+ },
142+ "onEnterRules" : [
143+ {
144+ // e.g. /** | */
145+ "beforeText" : {
146+ "pattern" : " ^\\ s*/\\ *\\ *(?!/)([^\\ *]|\\ *(?!/))*$"
147+ },
148+ "afterText" : {
149+ "pattern" : " ^\\ s*\\ */$"
150+ },
151+ "action" : {
152+ "indent" : " indentOutdent" ,
153+ "appendText" : " * "
154+ }
155+ },
156+ {
157+ // e.g. /** ...|
158+ "beforeText" : {
159+ "pattern" : " ^\\ s*/\\ *\\ *(?!/)([^\\ *]|\\ *(?!/))*$"
160+ },
161+ "action" : {
162+ "indent" : " none" ,
163+ "appendText" : " * "
164+ }
165+ },
166+ {
167+ // e.g. * ...|
168+ "beforeText" : {
169+ "pattern" : " ^(\\ t|[ ])*[ ]\\ *([ ]([^\\ *]|\\ *(?!/))*)?$"
170+ },
171+ "previousLineText" : {
172+ "pattern" : " (?=^(\\ s*(/\\ *\\ *|\\ *)).*)(?=(?!(\\ s*\\ */)))"
173+ },
174+ "action" : {
175+ "indent" : " none" ,
176+ "appendText" : " * "
177+ }
178+ },
179+ {
180+ // e.g. */|
181+ "beforeText" : {
182+ "pattern" : " ^(\\ t|[ ])*[ ]\\ */\\ s*$"
183+ },
184+ "action" : {
185+ "indent" : " none" ,
186+ "removeText" : 1
187+ },
188+ },
189+ {
190+ // e.g. *-----*/|
191+ "beforeText" : {
192+ "pattern" : " ^(\\ t|[ ])*[ ]\\ *[^/]*\\ */\\ s*$"
193+ },
194+ "action" : {
195+ "indent" : " none" ,
196+ "removeText" : 1
197+ },
198+ },
199+ {
200+ "beforeText" : {
201+ "pattern" : " ^\\ s*(\\ bcase\\ s.+:|\\ bdefault:)$"
202+ },
203+ "afterText" : {
204+ "pattern" : " ^(?!\\ s*(\\ bcase\\ b|\\ bdefault\\ b))"
205+ },
206+ "action" : {
207+ "indent" : " indent"
208+ }
209+ }
210+ ]
32211}
0 commit comments