mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Refactors calls to languages.setLanguageConfiguration to declarative descriptions in language-configuration.json. This fixes #98621.
This commit is contained in:
@@ -33,5 +33,49 @@
|
||||
"start": "^\\s*(#|\/\/)region\\b",
|
||||
"end": "^\\s*(#|\/\/)endregion\\b"
|
||||
}
|
||||
}
|
||||
},
|
||||
"wordPattern": { "pattern": "(-?\\d*\\.\\d\\w*)|([^\\-\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)", "flags": "g" },
|
||||
"onEnterRules": [
|
||||
{
|
||||
// e.g. /** | */
|
||||
"beforeText": "^\\s*\\/\\*\\*(?!\\/)([^\\*]|\\*(?!\\/))*$",
|
||||
"afterText": "^\\s*\\*\\/$",
|
||||
"action": {
|
||||
"indent": "indentOutdent",
|
||||
"appendText": " * "
|
||||
}
|
||||
},
|
||||
{
|
||||
// e.g. /** ...|
|
||||
"beforeText": "^\\s*\\/\\*\\*(?!\\/)([^\\*]|\\*(?!\\/))*$",
|
||||
"action": {
|
||||
"indent": "none",
|
||||
"appendText": " * "
|
||||
}
|
||||
},
|
||||
{
|
||||
// e.g. * ...|
|
||||
"beforeText": "^(\\t|(\\ \\ ))*\\ \\*(\\ ([^\\*]|\\*(?!\\/))*)?$",
|
||||
"action": {
|
||||
"indent": "none",
|
||||
"appendText": "* ",
|
||||
},
|
||||
},
|
||||
{
|
||||
// e.g. */|
|
||||
"beforeText": "^(\\t|(\\ \\ ))*\\ \\*\\/\\s*$",
|
||||
"action": {
|
||||
"indent": "none",
|
||||
"removeText": 1
|
||||
},
|
||||
},
|
||||
{
|
||||
// e.g. *-----*/|
|
||||
"beforeText": "^(\\t|(\\ \\ ))*\\ \\*[^/]*\\*\\/\\s*$",
|
||||
"action": {
|
||||
"indent": "none",
|
||||
"removeText": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user