Skip to content

Commit 0e6ab8f

Browse files
committed
更新配置
1 parent 4eddf60 commit 0e6ab8f

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

client/src/languageConfiguration.ts

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ export const luaConfiguration: vscode.LanguageConfiguration = {
1414
{ open: "[=====", close: "=====]" },
1515
],
1616
onEnterRules: [
17+
{
18+
beforeText: /\)\s*$/,
19+
afterText: /^\s*end\b/,
20+
action: {
21+
indentAction: vscode.IndentAction.IndentOutdent,
22+
}
23+
},
1724
{
1825
beforeText: /\b(\)|then|do|else)\b\s*$/,
1926
afterText: /^\s*end\b/,
@@ -28,5 +35,34 @@ export const luaConfiguration: vscode.LanguageConfiguration = {
2835
indentAction: vscode.IndentAction.IndentOutdent,
2936
}
3037
},
31-
]
38+
{
39+
beforeText: /^\s*---@/,
40+
action: {
41+
indentAction: vscode.IndentAction.None,
42+
appendText: "---@"
43+
}
44+
},
45+
{
46+
beforeText: /^\s*--- @/,
47+
action: {
48+
indentAction: vscode.IndentAction.None,
49+
appendText: "--- @"
50+
}
51+
},
52+
{
53+
beforeText: /^\s*--- /,
54+
action: {
55+
indentAction: vscode.IndentAction.None,
56+
appendText: "--- "
57+
}
58+
},
59+
{
60+
beforeText: /^\s*---/,
61+
action: {
62+
indentAction: vscode.IndentAction.None,
63+
appendText: "---"
64+
}
65+
},
66+
],
67+
wordPattern: /(-?\d*\.\d\w*)|(-?\d+\.)|([\p{L}_\u10000-\uFFFFFFFF][\p{L}\p{N}_\u10000-\uFFFFFFFF]*)/gu,
3268
};

0 commit comments

Comments
 (0)