mirror of
https://github.com/cap153/nvim.git
synced 2026-05-11 17:35:59 +08:00
first commit
This commit is contained in:
commit
3b19a9c8a8
29 changed files with 2428 additions and 0 deletions
73
snippets/rust.json
Normal file
73
snippets/rust.json
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
"main": {
|
||||
"prefix": "main",
|
||||
"body": [
|
||||
"fn main() {",
|
||||
"\t${0}",
|
||||
"}"
|
||||
],
|
||||
"description": "custom main"
|
||||
},
|
||||
"fn": {
|
||||
"prefix": "fn",
|
||||
"body": [
|
||||
"fn ${1}(${2}) ${3}{",
|
||||
"\t${4}",
|
||||
"}"
|
||||
],
|
||||
"description": "custom function"
|
||||
},
|
||||
"let":{
|
||||
"prefix": "let",
|
||||
"body": [
|
||||
"let ${1} = ${2};"
|
||||
],
|
||||
"description": "custom let"
|
||||
},
|
||||
"letmut":{
|
||||
"prefix": "letm",
|
||||
"body": [
|
||||
"let mut ${1} = ${2};"
|
||||
],
|
||||
"description": "custom let mut"
|
||||
},
|
||||
"pri":{
|
||||
"prefix": "pri",
|
||||
"body": [
|
||||
"println!(\"${1}\"${2});"
|
||||
],
|
||||
"description": "custom println"
|
||||
},
|
||||
"println":{
|
||||
"prefix": "println",
|
||||
"body": [
|
||||
"println!(\"${1}\"${2});"
|
||||
],
|
||||
"description": "custom println"
|
||||
},
|
||||
"print":{
|
||||
"prefix": "print",
|
||||
"body": [
|
||||
"print!(\"${1}\"${2});"
|
||||
],
|
||||
"description": "custom print"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": [
|
||||
"if ${1} {",
|
||||
"\t${2}",
|
||||
"}"
|
||||
],
|
||||
"description": "custom if"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for ${1} in ${2} {",
|
||||
"\t${3}",
|
||||
"}"
|
||||
],
|
||||
"description": "custom for"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue