vim: Add rust display snippet
This commit is contained in:
parent
b38842131b
commit
2224bfd3ca
7
home/.config/nvim/UltiSnips/rust.snippets
Normal file
7
home/.config/nvim/UltiSnips/rust.snippets
Normal file
|
@ -0,0 +1,7 @@
|
|||
snippet disp "Display trait implentation"
|
||||
impl fmt::Display for ${1:Struct} {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "${2}", ${3})
|
||||
}
|
||||
}${0}
|
||||
endsnippet
|
Reference in a new issue