【发布时间】:2020-07-23 21:32:11
【问题描述】:
inl f _ =
()
假设我将插入符号放在 () 中,按 Enter + a。
inl f _ =
(
a
)
我明白了。我宁愿它不自动缩进,而是执行以下操作。
inl f _ =
(
a
)
language-configuration.json 文件中有以下内容。
{
"comments": {
"lineComment": "//",
},
"brackets": [["{", "}"], ["[", "]"], ["(", ")"]],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string"] },
],
"autoCloseBefore": "}]) \n",
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["'", "'"],
["\"", "\""],
],
"indentationRules": {
"increaseIndentPattern": "",
"decreaseIndentPattern": ""
}
}
The guide 对缩进规则有一点要说。
如果没有为编程语言设置缩进规则,编辑器将在行以左括号结束时缩进,在您键入右括号时缩进。这里的括号是用括号定义的。
我猜我正在经历的行为与此有关。如果您查看配置文件,我故意粘贴空规则以避免这种情况,但它不起作用。我应该在这里做什么?
【问题讨论】: