提交 f530aa08 编写于 作者: B bors

auto merge of #19095 : juxiliary/rust/master, r=bstrie

Vim plugins shouldn't override user settings unless they ask!

Stops the plugin from modifying the users settings by default
instead makes them opt-in with `g:rust_recommended_style`
......@@ -53,6 +53,15 @@ g:rust_conceal_pub~
let g:rust_conceal_pub = 1
<
*g:rust_recommended_style*
g:rust_recommended_style~
Set this option to enable vim indentation and textwidth settings to
conform to style conventions of the rust standard library (i.e. use 4
spaces for indents and sets 'textwidth' to 99). This option is enabled
by default. To disable it: >
let g:rust_recommended_style = 0
<
*g:rust_fold*
g:rust_fold~
Set this option to turn on |folding|: >
......
......@@ -35,9 +35,10 @@ silent! setlocal formatoptions+=j
" otherwise it's better than nothing.
setlocal smartindent nocindent
setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
setlocal textwidth=99
if !exists("g:rust_recommended_style") || g:rust_recommended_style == 1
setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
setlocal textwidth=99
endif
" This includeexpr isn't perfect, but it's a good start
setlocal includeexpr=substitute(v:fname,'::','/','g')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册