mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 00:59:03 +01:00
Making same changes to JavaScript language configuration file as for TypeScript (#209038)
making the language configuration file the same as for typescript
This commit is contained in:
committed by
GitHub
parent
f6e74f9990
commit
f62931d09b
@@ -119,6 +119,9 @@
|
||||
// e.g. * ...| or */| or *-----*/|
|
||||
"unIndentedLinePattern": {
|
||||
"pattern": "^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$|^(\\t|[ ])*[ ]\\*/\\s*$|^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$"
|
||||
},
|
||||
"indentNextLinePattern": {
|
||||
"pattern": "^((.*=>\\s*)|((.*[^\\w]+|\\s*)(if|while|for)\\s*\\(.*\\)\\s*))$"
|
||||
}
|
||||
},
|
||||
"onEnterRules": [
|
||||
@@ -197,6 +200,33 @@
|
||||
"action": {
|
||||
"indent": "outdent"
|
||||
}
|
||||
}
|
||||
},
|
||||
// Indent when pressing enter from inside ()
|
||||
{
|
||||
"beforeText": "^.*\\([^\\)]*$",
|
||||
"afterText": "^\\s*\\).*$",
|
||||
"action": {
|
||||
"indent": "indentOutdent",
|
||||
"appendText": "\t",
|
||||
}
|
||||
},
|
||||
// Indent when pressing enter from inside {}
|
||||
{
|
||||
"beforeText": "^.*\\{[^\\}]*$",
|
||||
"afterText": "^\\s*\\}.*$",
|
||||
"action": {
|
||||
"indent": "indentOutdent",
|
||||
"appendText": "\t",
|
||||
}
|
||||
},
|
||||
// Indent when pressing enter from inside []
|
||||
{
|
||||
"beforeText": "^.*\\[[^\\]]*$",
|
||||
"afterText": "^\\s*\\].*$",
|
||||
"action": {
|
||||
"indent": "indentOutdent",
|
||||
"appendText": "\t",
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user