mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
add(nvim): linked snippets
This commit is contained in:
parent
24cf0bcbe5
commit
da08b92ed7
8 changed files with 105 additions and 1 deletions
21
.config/nvim/snippets/rust.json
Normal file
21
.config/nvim/snippets/rust.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"Create main function": {
|
||||
"prefix": "main",
|
||||
"body": [
|
||||
"${0}",
|
||||
"fn main() {",
|
||||
"\t",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Implement std::fmt::Display trait": {
|
||||
"prefix": "implfmt",
|
||||
"body": [
|
||||
"impl fmt::Display for ${1:Struct} {",
|
||||
"\tfn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {",
|
||||
"\t\twrite!(f, \"${2:format}\", ${3:fields})",
|
||||
"\t}",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue