1
0
Fork 0
mirror of synced 2024-11-17 22:45:34 -05:00
ultimate-vim/sources_non_forked/vim-snippets/UltiSnips/rust.snippets

35 lines
667 B
Text
Raw Normal View History

2018-10-14 09:43:54 -04:00
#######################################################################
# Rust Snippets #
#######################################################################
priority -50
snippet arg "Function Arguments" i
${1:a}: ${2:T}${3:, arg}
endsnippet
snippet || "Closure, anonymous function (inline)" i
${1:move }|$2| { $3 }
endsnippet
snippet |} "Closure, anonymous function (block)" i
${1:move }|$2| {
$3
}
endsnippet
snippet macro "macro_rules!" b
macro_rules! ${1:name} {
(${2:matcher}) => (
$3
)
}
endsnippet
snippet fd "Struct field definition" w
${1:name}: ${2:Type},
endsnippet
# vim:ft=snippets: