mirror of
https://github.com/rafamadriz/friendly-snippets
synced 2024-09-16 22:14:02 +02:00
52 lines
1.4 KiB
JSON
52 lines
1.4 KiB
JSON
{
|
|
"fn": {
|
|
"prefix": "fn",
|
|
"body": "(fn ${1:name} [${2:params}]\n )",
|
|
"description": "Create a function"
|
|
},
|
|
"let": {
|
|
"prefix": "let",
|
|
"body": "(let [${1:name} ${2:value}])",
|
|
"description": "Create a variable"
|
|
},
|
|
"while": {
|
|
"prefix": "while",
|
|
"body": "(while (${1:condition})\n($0))",
|
|
"description": "Create a while loop"
|
|
},
|
|
"var": {
|
|
"prefix": "var",
|
|
"body": "(var ${1:name} ${2:value})",
|
|
"description": "Create a variable with var"
|
|
},
|
|
"local": {
|
|
"prefix": "local",
|
|
"body": "(local ${1:name} ${2:value})",
|
|
"description": "Create a variable with local"
|
|
},
|
|
"for": {
|
|
"prefix": "for",
|
|
"body": "(for [i 1 10]\n($0))",
|
|
"description": "Create a for loop"
|
|
},
|
|
"global": {
|
|
"prefix": "global",
|
|
"body": "(global $0)",
|
|
"description": "Create a global"
|
|
},
|
|
"require": {
|
|
"prefix": "require",
|
|
"body": "(require :${1:module})",
|
|
"description": "Require a module"
|
|
},
|
|
"create a table": {
|
|
"prefix": "tbl",
|
|
"body": "(let [${1:tbl} {}\n\t${2:key1} ${3:key1_value}])",
|
|
"description": "Declaring a table"
|
|
},
|
|
"set table value": {
|
|
"prefix": "tset",
|
|
"body": "(tset ${1:tbl} ${2:value})",
|
|
"description": "Set a value in a table"
|
|
}
|
|
}
|