Skip to content

Commit

Permalink
add snippets for control blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
heterophyllus committed Nov 26, 2022
1 parent 972b997 commit 0224e03
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the "vscode-codev" extension will be documented in this file.

## [0.5.3]
- Add snippets for control blocks
- Add indentation rules

## [0.5.2]
- Some of the snippets were simplified.
- The file "sample.seq" was removed.
Expand Down
7 changes: 6 additions & 1 deletion language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,10 @@
["(", ")"],
["\"", "\""],
["'", "'"]
]
],

"indentationRules": {
"increaseIndentPattern": "^\\s*\\b(fct|if|els|els if|for|whi|unt)\\b",
"decreaseIndentPattern": "^\\s*\\b(end\\w*|els|els if)\\b"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"name": "Hiiragi",
"email": "[email protected]"
},
"version": "0.5.2",
"version": "0.5.3",
"engines": {
"vscode": "^1.41.0"
},
Expand Down
52 changes: 52 additions & 0 deletions snippets/codev.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,56 @@
{
"for":{
"prefix": "for",
"body":[
"for ${1:var} ${2:expr1} ${3:expr2}",
"\t$0",
"end for"
],
"description": "for loop"
},

"whi":{
"prefix":"whi",
"body": [
"whi ${1:expr}",
"\t$0",
"end whi"
],
"description":"while loop"
},

"unt":{
"prefix":"unt",
"body":[
"unt",
"\t$0",
"end unt ${1:expr}"
],
"description":"until loop"
},

"if":{
"prefix":"if",
"body":[
"if ${1:expr}",
"\t$0",
"end if"
],
"description":"if...end"
},

"if_elseif":{
"prefix":"if",
"body":[
"if ${1:expr}",
"\t$0",
"els if ${2:expr}",
"\t$0",
"end if"
],
"description":"if...elseif...end"
},

"ABSF":{
"prefix": "ABSF",
"body": "ABSF($1)",
Expand Down

0 comments on commit 0224e03

Please sign in to comment.