mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-21 11:33:45 +08:00
16 lines
334 B
VimL
16 lines
334 B
VimL
|
" vint: -ProhibitAutocmdWithNoGroup
|
||
|
|
||
|
autocmd BufRead,BufNewFile *.rs call s:set_rust_filetype()
|
||
|
|
||
|
if has('patch-8.0.613')
|
||
|
autocmd BufRead,BufNewFile Cargo.toml setf FALLBACK cfg
|
||
|
endif
|
||
|
|
||
|
function! s:set_rust_filetype() abort
|
||
|
if &filetype !=# 'rust'
|
||
|
set filetype=rust
|
||
|
endif
|
||
|
endfunction
|
||
|
|
||
|
" vim: set et sw=4 sts=4 ts=8:
|