Skip to content

Commit 3e7d662

Browse files
authored
Improve word matching for kebab case. (#223)
Also add auto-indent.
1 parent 4a7dfef commit 3e7d662

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

vscode/language-configuration.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,10 @@
2727
["(", ")"],
2828
["\"", "\""],
2929
["'", "'"]
30-
]
30+
],
31+
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s\\$]+)",
32+
"indentationRules": {
33+
"increaseIndentPattern": "[\\:]([\\s]*\\|(\\s*[\\w-]+)+\\s*\\|)?$",
34+
"decreaseIndentPattern": "^[\\s]*else[\\:]$"
35+
}
3136
}

vscode/package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Toit",
44
"description": "Toit Programming Language Support",
55
"publisher": "toit",
6-
"version": "1.7.0",
6+
"version": "1.8.2",
77
"license": "MIT",
88
"type": "commonjs",
99
"engines": {
@@ -17,15 +17,21 @@
1717
"url": "https://github.com/toitware/ide-tools.git"
1818
},
1919
"activationEvents": [
20-
"onLanguage:toit",
2120
"workspaceContains:**/*.toit",
2221
"onView:toitView",
23-
"onCommand:toit.ensureAuth",
2422
"onCommand:toit.refreshView"
2523
],
2624
"icon": "images/toitware_logo.png",
2725
"main": "./dist/extension.js",
2826
"contributes": {
27+
"configurationDefaults": {
28+
"[toit]": {
29+
"editor.wordSeparators": "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?",
30+
"editor.indentSize": 2,
31+
"editor.insertSpaces": true,
32+
"editor.detectIndentation": false
33+
}
34+
},
2935
"viewsContainers": {
3036
"activitybar": [
3137
{

0 commit comments

Comments
 (0)