summaryrefslogtreecommitdiff
path: root/vim/ftplugin
diff options
context:
space:
mode:
authorNick Shipp <nick@shipp.ninja>2017-06-03 01:07:10 -0400
committerNick Shipp <nick@shipp.ninja>2017-06-03 01:07:10 -0400
commit447137cd744d80f498062558c94e31c187b947eb (patch)
treebffe06e5e632d5b699e3381f8774d3f93123d08c /vim/ftplugin
parentc012f55efda29f09179e921cf148d79deb57616e (diff)
Tweaks to rust cfg for vim
Diffstat (limited to 'vim/ftplugin')
-rw-r--r--vim/ftplugin/rust.vim13
1 files changed, 6 insertions, 7 deletions
diff --git a/vim/ftplugin/rust.vim b/vim/ftplugin/rust.vim
index 8bdfbe5..7d378b9 100644
--- a/vim/ftplugin/rust.vim
+++ b/vim/ftplugin/rust.vim
@@ -1,12 +1,11 @@
""
" Rust config
-" TODO: Move to ftplugin
"
-au FileType rust nmap <C-]> <Plug>(rust-def)
-au FileType rust nmap g<C-]> <Plug>(rust-def-split)
-au FileType rust nmap g<S-C-]> <Plug>(rust-def-vertical)
-au FileType rust nmap K <Plug>(rust-doc)
-au FileType rust compiler cargo
-au FileType rust set formatprg=rustfmt
+nmap <buffer> <C-]> <Plug>(rust-def)
+nmap <buffer> g<C-]> <Plug>(rust-def-split)
+nmap <buffer> g<S-C-]> <Plug>(rust-def-vertical)
+nmap <buffer> K <Plug>(rust-doc)
+compiler cargo
+setl formatexpr=rustfmt#FormatRange()
"