Skip to content

Commit

Permalink
feat: add basic snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 18, 2019
1 parent 6ca1fa2 commit 2c15d7e
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
## ToDo

- [x] Syntax Highlight
- [ ] Snippets
- [x] Snippets
- [ ] Dynamic Snippets
- [ ] Language Server
- [ ] Excute
- [ ] Rendering
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"vscode": "^1.40.0"
},
"categories": [
"Programming Languages"
"Programming Languages",
"Snippets"
],
"activationEvents": [
"*"
Expand Down
158 changes: 157 additions & 1 deletion snippets/wenyan.json
Original file line number Diff line number Diff line change
@@ -1 +1,157 @@
{}
{
"if": {
"prefix": [
"if",
""
],
"body": [
"若${1: }者。",
"\t$2",
"也。"
],
"description": ""
},
"else": {
"prefix": [
"else",
"若非"
],
"body": [
"若非。",
"\t$1",
"也。"
],
"description": "若非"
},
"for-loop": {
"prefix": [
"for",
"為是"
],
"body": [
"為是${1:百}遍。",
"\t$2",
"云云。"
],
"description": "為是數遍"
},
"for-of": {
"prefix": [
"for-of",
"forof",
""
],
"body": [
"凡${1: }中之${2: }。",
"\t$3",
"云云。"
],
"description": "凡⋯中之"
},
"break": {
"prefix": [
"break",
"乃止"
],
"body": [
"乃止。"
],
"description": "乃止"
},
"while-true": {
"prefix": [
"while",
"恆為"
],
"body": [
"恆為是。",
"\t$1",
"云云。"
],
"description": "恆為是"
},
"comments": {
"prefix": [
"com",
"//",
"",
"",
""
],
"body": [
"批曰。「「$1」」"
],
"description": "批注"
},
"function": {
"prefix": [
"fun",
""
],
"body": [
"吾有一術。名之曰「$1」。是術曰。",
"\t$2",
"是謂「$1」之術也。"
],
"description": "武功秘籍"
},
"double-quote": {
"prefix": [
"\""
],
"body": [
"「「$1」」"
],
"description": "「「⋯⋯」」"
},
"single-quote": {
"prefix": [
"'"
],
"body": [
"「$1」"
],
"description": "「⋯⋯」"
},
"var-int": {
"prefix": [
"int",
""
],
"body": [
"吾有一數。曰$1。名之曰「$2」。"
],
"description": ""
},
"var-string": {
"prefix": [
"str",
""
],
"body": [
"吾有一言。曰「「$1」」。名之曰「$2」。"
],
"description": ""
},
"var-bool": {
"prefix": [
"bool",
""
],
"body": [
"吾有一爻。曰${1:陰}。名之曰「$2」。"
],
"description": ""
},
"var-array": {
"prefix": [
"arr",
"list",
""
],
"body": [
"吾有一列。名之曰「$1」。"
],
"description": ""
}
}

0 comments on commit 2c15d7e

Please sign in to comment.