File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,15 @@ g:rust_conceal_pub~
5353 let g:rust_conceal_pub = 1
5454<
5555
56+ *g:rust_recommended_style*
57+ g:rust_recommended_style~
58+ Set this option to enable vim indentation and textwidth settings to
59+ conform to style conventions of the rust standard library (i.e. use 4
60+ spaces for indents and sets 'textwidth' to 99). This option is enabled
61+ by default. To disable it: >
62+ let g:rust_recommended_style = 0
63+ <
64+
5665 *g:rust_fold*
5766g:rust_fold~
5867 Set this option to turn on | folding | : >
Original file line number Diff line number Diff line change @@ -35,9 +35,10 @@ silent! setlocal formatoptions+=j
3535" otherwise it's better than nothing.
3636setlocal smartindent nocindent
3737
38- setlocal tabstop = 4 shiftwidth = 4 softtabstop = 4 expandtab
39-
40- setlocal textwidth = 99
38+ if ! exists (" g:rust_recommended_style" ) || g: rust_recommended_style == 1
39+ setlocal tabstop = 4 shiftwidth = 4 softtabstop = 4 expandtab
40+ setlocal textwidth = 99
41+ endif
4142
4243" This includeexpr isn't perfect, but it's a good start
4344setlocal includeexpr = substitute (v: fname ,' ::' ,' /' ,' g' )
You can’t perform that action at this time.
0 commit comments