~gpanders/dotfiles

ref: 12291d3163062a0a3c879f53a0b0d02541376ca4 dotfiles/vim/.vim/after/ftplugin/rust.vim -rw-r--r-- 282 bytes
12291d31Greg Anders [vim] Make git commit buffers in vim always start at line 1 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
" Rust
if &filetype !=# 'rust'
  finish
endif

if executable('rustfmt')
  setl formatprg=rustfmt

  if exists('b:undo_ftplugin')
    let b:undo_ftplugin .= '|setl fp<'
  else
    let b:undo_ftplugin = 'setl fp<'
  endif
endif

let g:rustfmt_emit_file = 1
let b:rustfmt_autosave = 1