mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 02:26:04 +00:00
77 lines
1.8 KiB
JSON
77 lines
1.8 KiB
JSON
{
|
|
".source.rust": {
|
|
"enum": {
|
|
"prefix": "enum",
|
|
"body": "enum ${1:TypeName} {\n\t$2\n}"
|
|
},
|
|
"fn": {
|
|
"prefix": "fn",
|
|
"body": "fn ${1:function_name}($2) {\n\t$3\n}"
|
|
},
|
|
"fnr": {
|
|
"prefix": "fnr",
|
|
"body": "fn ${1:function_name}($2) -> ${3:TypeName} {\n\t$4\n}"
|
|
},
|
|
"for": {
|
|
"prefix": "for",
|
|
"body": "for ${1:variable} in ${2:iterator} {\n\t$3\n}"
|
|
},
|
|
"if": {
|
|
"prefix": "if",
|
|
"body": "if ${1:expression} {\n\t$2\n}"
|
|
},
|
|
"impl": {
|
|
"prefix": "impl",
|
|
"body": "impl ${1:TypeName} {\n\t$2\n}"
|
|
},
|
|
"let": {
|
|
"prefix": "let",
|
|
"body": "let ${1:variable} = ${2:value};"
|
|
},
|
|
"loop": {
|
|
"prefix": "loop",
|
|
"body": "loop {\n\t$1\n}"
|
|
},
|
|
"macro": {
|
|
"prefix": "macro",
|
|
"body": "macro_rules! ${1:macro_name} {\n\t($2) => ($3);\n}"
|
|
},
|
|
"main": {
|
|
"prefix": "main",
|
|
"body": "fn main() {\n\t$1\n}"
|
|
},
|
|
"match": {
|
|
"prefix": "match",
|
|
"body": "match ${1:expression} {\n\t$2\n}"
|
|
},
|
|
"static": {
|
|
"prefix": "static",
|
|
"body": "static ${1:CONSTANT}: ${2:TypeName} = ${3:value};"
|
|
},
|
|
"struct": {
|
|
"prefix": "struct",
|
|
"body": "struct ${1:TypeName} {\n\t$2\n}"
|
|
},
|
|
"test": {
|
|
"prefix": "test",
|
|
"body": "#[test]\nfn ${1:test_name}() {\n\t$2\n}"
|
|
},
|
|
"testmod": {
|
|
"prefix": "testmod",
|
|
"body": "#[cfg(test)]\nmod test {\n\t#[test]\n\tfn ${1:test_name}() {\n\t\t$2\n\t}\n}"
|
|
},
|
|
"trait": {
|
|
"prefix": "trait",
|
|
"body": "trait ${1:TypeName} {\n\t$2\n}"
|
|
},
|
|
"type": {
|
|
"prefix": "type",
|
|
"body": "type ${1:TypeName} = ${2:TypeName};"
|
|
},
|
|
"while": {
|
|
"prefix": "while",
|
|
"body": "while ${1:expression} {\n\t$2\n}"
|
|
}
|
|
}
|
|
}
|