summaryrefslogtreecommitdiff
path: root/vim/ftplugin
diff options
context:
space:
mode:
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()
"