mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-13 22:13:50 -05:00
Update
This commit is contained in:
@@ -5,7 +5,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
||||
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
||||
" Maintainer: Kevin Ballard <kevin@sb.org>
|
||||
" Last Change: June 08, 2016
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -54,8 +54,8 @@ if get(g:, 'rust_recommended_style', 1)
|
||||
setlocal textwidth=99
|
||||
endif
|
||||
|
||||
" This includeexpr isn't perfect, but it's a good start
|
||||
setlocal includeexpr=substitute(v:fname,'::','/','g')
|
||||
setlocal include=\\v^\\s*(pub\\s+)?use\\s+\\zs(\\f\|:)+
|
||||
setlocal includeexpr=rust#IncludeExpr(v:fname)
|
||||
|
||||
setlocal suffixesadd=.rs
|
||||
|
||||
@@ -149,7 +149,7 @@ endif
|
||||
" Cleanup {{{1
|
||||
|
||||
let b:undo_ftplugin = "
|
||||
\ setlocal formatoptions< comments< commentstring< includeexpr< suffixesadd<
|
||||
\ setlocal formatoptions< comments< commentstring< include< includeexpr< suffixesadd<
|
||||
\|if exists('b:rust_set_style')
|
||||
\|setlocal tabstop< shiftwidth< softtabstop< expandtab< textwidth<
|
||||
\|endif
|
||||
@@ -188,7 +188,7 @@ let b:undo_ftplugin = "
|
||||
" Code formatting on save
|
||||
augroup rust.vim.PreWrite
|
||||
autocmd!
|
||||
autocmd BufWritePre <buffer> silent! call rustfmt#PreWrite()
|
||||
autocmd BufWritePre *.rs silent! call rustfmt#PreWrite()
|
||||
augroup END
|
||||
|
||||
setlocal matchpairs+=<:>
|
||||
|
||||
Reference in New Issue
Block a user