mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-21 18:28:50 +00:00
65 lines
2.4 KiB
JSON
65 lines
2.4 KiB
JSON
{
|
|
"comments": {
|
|
"lineComment": "'"
|
|
},
|
|
"brackets": [
|
|
["{", "}"],
|
|
["[", "]"],
|
|
["(", ")"]
|
|
],
|
|
"autoClosingPairs": [
|
|
["{", "}"],
|
|
["[", "]"],
|
|
["(", ")"],
|
|
{ "open": "\"", "close": "\"", "notIn": ["string"] }
|
|
],
|
|
"surroundingPairs": [
|
|
["{", "}"],
|
|
["[", "]"],
|
|
["(", ")"],
|
|
["\"", "\""],
|
|
["<", ">"]
|
|
],
|
|
"folding": {
|
|
"markers": {
|
|
"start": "^\\s*#Region\\b",
|
|
"end": "^\\s*#End Region\\b"
|
|
}
|
|
},
|
|
"indentationRules": {
|
|
"decreaseIndentPattern": {
|
|
"pattern": "^\\s*((End\\s+(If|Sub|Function|Class|Module|Enum|Structure|Interface|Namespace|With|Select|Try|While|For|Property|Get|Set|SyncLock|Using|AddHandler|RaiseEvent|RemoveHandler|Event|Operator))|Else|ElseIf|Case|Catch|Finally|Loop|Next|Wend|Until)\\b",
|
|
"flags": "i"
|
|
},
|
|
"increaseIndentPattern": {
|
|
"pattern": "^\\s*((If|ElseIf).*Then(?!\\s+(End\\s+If))\\s*(('|REM).*)?$)|\\b(Else|While|For|Do|Select\\s+Case|Case|Sub|Function|Class|Module|Enum|Structure|Interface|Namespace|With|Try|Catch|Finally|SyncLock|Using|Property|Get|Set|AddHandler|RaiseEvent|RemoveHandler|Event|Operator)\\b(?!.*\\bEnd\\s+(If|Sub|Function|Class|Module|Enum|Structure|Interface|Namespace|With|Select|Try|While|For|Property|Get|Set|SyncLock|Using|AddHandler|RaiseEvent|RemoveHandler|Event|Operator)\\b).*(('|REM).*)?$",
|
|
"flags": "i"
|
|
}
|
|
},
|
|
"onEnterRules": [
|
|
// Prevent indent after End statements, block terminators (Else, ElseIf, Loop, Next, etc.)
|
|
{
|
|
"beforeText": { "pattern": "^\\s*((End\\s+(If|Sub|Function|Class|Module|Enum|Structure|Interface|Namespace|With|Select|Try|While|For|Property|Get|Set|SyncLock|Using|AddHandler|RaiseEvent|RemoveHandler|Event|Operator))|Else|ElseIf|Loop|Next|Wend|Until)\\b.*$", "flags": "i" },
|
|
"action": {
|
|
"indent": "none"
|
|
}
|
|
},
|
|
// Prevent indent when pressing Enter on a blank line after End statements or block terminators
|
|
{
|
|
"beforeText": "^\\s*$",
|
|
"previousLineText": { "pattern": "^\\s*((End\\s+(If|Sub|Function|Class|Module|Enum|Structure|Interface|Namespace|With|Select|Try|While|For|Property|Get|Set|SyncLock|Using|AddHandler|RaiseEvent|RemoveHandler|Event|Operator))|Else|ElseIf|Loop|Next|Wend|Until)\\b.*$", "flags": "i" },
|
|
"action": {
|
|
"indent": "none"
|
|
}
|
|
},
|
|
// Prevent indent after lines ending with closing parenthesis (e.g., function calls, method invocations)
|
|
{
|
|
"beforeText": { "pattern": "^[^'\"]*\\)\\s*('.*)?$", "flags": "i" },
|
|
"afterText": "^(?!\\s*\\))",
|
|
"action": {
|
|
"indent": "none"
|
|
}
|
|
}
|
|
]
|
|
}
|