Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Commit

Permalink
Auto bracket closing for nimble files and improved identation pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
RSDuck committed Mar 15, 2017
1 parent da4c69a commit c62a119
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion nimcfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
["#[", "]#"],
{"open": "[", "close": "]", "notIn": ["comment"]},
["(", ")"],
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] }
],
"surroundingPairs": [
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
{
"id": "nimble",
"aliases": ["Nimble", "nimble"],
"extensions": [".nimble"]
"extensions": [".nimble"],
"configuration": "./nimcfg.json"
}
],
"grammars": [
Expand Down
2 changes: 1 addition & 1 deletion src/nimMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function activate(ctx: vscode.ExtensionContext): void {

vscode.languages.setLanguageConfiguration(NIM_MODE.language, {
indentationRules: {
increaseIndentPattern: /^\s*(((if|when|elif|else|except|finally|for|try|while|of)\b.*:)|((proc|macro|iterator|template|converter)\b.*\=)|(import|var|const|type))\s*$/,
increaseIndentPattern: /^\s*((((proc|macro|iterator|template|converter)\b.*\=)|(import|var|const|type)\s)|(import|let|var|const|type)|([^:]+:))$/,
decreaseIndentPattern: /^\s*(((return|break|continue|raise)\n)|((elif|else|except|finally)\b.*:))\s*$/
},
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
Expand Down

0 comments on commit c62a119

Please sign in to comment.