Skip to content

Commit f19fb88

Browse files
committed
feat: add language-configuration.json
1 parent e16ae27 commit f19fb88

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

packages/vscode/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
],
1919
"extensions": [
2020
".jsrs"
21-
]
21+
],
22+
"configuration": "./syntaxes/language-configuration.json"
2223
}
2324
],
2425
"grammars": [
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"comments": {
3+
"lineComment": "//",
4+
"blockComment": ["/*", "*/"]
5+
},
6+
"brackets": [
7+
["{", "}"],
8+
["[", "]"],
9+
["(", ")"]
10+
],
11+
"colorizedBracketPairs": [
12+
["{", "}"],
13+
["[", "]"],
14+
["(", ")"]
15+
],
16+
"autoClosingPairs": [
17+
{ "open": "{", "close": "}" },
18+
{ "open": "[", "close": "]" },
19+
{ "open": "(", "close": ")" },
20+
{ "open": "\"", "close": "\"", "notIn": ["string"] },
21+
{ "open": "/*", "close": " */", "notIn": ["string"] },
22+
{ "open": "`", "close": "`", "notIn": ["string"] },
23+
{ "open": "```", "close": "```", "notIn": ["string"] }
24+
],
25+
"autoCloseBefore": ";:.,=}])> \n\t",
26+
"surroundingPairs": [
27+
["{", "}"],
28+
["[", "]"],
29+
["(", ")"],
30+
["<", ">"],
31+
["\"", "\""],
32+
["'", "'"],
33+
["`", "`"],
34+
["```", "```"]
35+
],
36+
"indentationRules": {
37+
"increaseIndentPattern": "^.*\\{[^}\"']*$|^.*\\([^\\)\"']*$",
38+
"decreaseIndentPattern": "^\\s*(\\s*\\/[*].*[*]\\/\\s*)*[})]"
39+
},
40+
"folding": {
41+
"markers": {
42+
"start": "^\\s*// region:\\b",
43+
"end": "^\\s*// endregion\\b"
44+
}
45+
}
46+
}

0 commit comments

Comments
 (0)