Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding some snippets to the package #5

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.vsix
*.vsix
test.art
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
"extensions": [".art"],
"configuration": "./language-configuration.json"
}],
"snippets": [
{
"language": "arturo",
"path": "./snippets/*.json"
}
],
"grammars": [{
"language": "art",
"scopeName": "source.arturo",
Expand Down
117 changes: 117 additions & 0 deletions snippets/arithmetic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{

"add function": {
"scope": "art",
"prefix": "add",
"body": "add $1 $2"
},

"add sign": {
"scope": "art",
"prefix": "add",
"body": "$1 + $2"
},

"dec function": {
"scope": "art",
"prefix": "dec",
"body": "dec $1"
},

"div function": {
"scope": "art",
"prefix": "div",
"body": "div $1 $2"
},

"div sign": {
"scope": "art",
"prefix": "div",
"body": "$1 / $2"
},

"divmod function": {
"scope": "art",
"prefix": "divmod",
"body": "divmod $1 $2"
},

"divmod sign": {
"scope": "art",
"prefix": "divmod",
"body": "$1 /% $2"
},

"fdiv function": {
"scope": "art",
"prefix": "fdiv",
"body": "fdiv $1 $2"
},

"fdiv sign": {
"scope": "art",
"prefix": "fdiv",
"body": "$1 // $2"
},

"inc function": {
"scope": "art",
"prefix": "inc",
"body": "inc $1 $2"
},

"mod function": {
"scope": "art",
"prefix": "mod",
"body": "mod $1 $2"
},

"mod sign": {
"scope": "art",
"prefix": "mod",
"body": "$1 % $2"
},

"mul function": {
"scope": "art",
"prefix": "mul",
"body": "mul $1 $2"
},

"mul sign": {
"scope": "art",
"prefix": "mul",
"body": "$1 * $2"
},

"neg function": {
"scope": "art",
"prefix": "neg",
"body": "neg $1"
},

"power function": {
"scope": "art",
"prefix": "pow",
"body": "pow $1 $2"
},

"power sign": {
"scope": "art",
"prefix": "pow",
"body": "$1 ^ $2"
},

"sub function": {
"scope": "art",
"prefix": "sub",
"body": "sub $1 $2"
},

"sub sign": {
"scope": "art",
"prefix": "sub",
"body": "$1 - $2"
}

}
Loading