Commit Graph

67 Commits

Author SHA1 Message Date
Nick Cameron
677446e99d Merge fn_empty_single_line and impl_empty_single_line into empty_item_single_line 2017-11-27 17:46:09 +13:00
Nick Cameron
9a33255834 Rename wrap_match_arms to match_arm_blocks 2017-11-27 17:35:27 +13:00
Nick Cameron
8f4d85a9d7 Merge multiline_closure_forces_block and multiline_match_arm_forces_block into force_multiline_block 2017-11-27 17:03:54 +13:00
Nick Cameron
087f8b5854 Remove match_arm_forces_newline 2017-11-27 16:31:49 +13:00
Nick Cameron
0e1fa2c244 Remove indent_match_arms 2017-11-27 15:49:14 +13:00
Nick Cameron
86007e7d17 Remove where_density and where_layout options
There is a choice between block and visual indent for where clauses, plus the
single line option. I think these two are too fine-grained to be useful.
2017-11-24 21:08:24 +13:00
Nick Cameron
dd1fbca99a Replace various small width heuristics with a single option
Closes #1984
2017-11-24 20:17:06 +13:00
Nick Cameron
45d4f7a2dd struct_lit_multiline_style -> struct_lit_single_line (and make it a bool) 2017-11-24 14:45:18 +13:00
Nick Cameron
20805acf42 Merge attributes_on_same_line_as_field and attributes_on_same_line_as_variant into same_line_attributes 2017-11-24 14:29:44 +13:00
Nick Cameron
d00c60df5c Remove chain_split_single_child option 2017-11-24 14:12:54 +13:00
Nick Cameron
4cb474b5ee Remove force_format_strings in favour of format_strings 2017-11-24 14:07:37 +13:00
Nick Cameron
8a7b6b8806 Remove match_pattern_separator_break_point in favour of binop_separator 2017-11-24 14:01:44 +13:00
Nick Cameron
179b3c59de Remove legacy option fn_args_paren_newline 2017-11-24 13:27:14 +13:00
Nick Cameron
4f65124422 Remove legacy option fn_return_indent 2017-11-24 13:19:36 +13:00
Nick Cameron
d0f12b8ec8 Remove unused option take_source_hints 2017-11-24 13:08:02 +13:00
Dirkjan Ochtman
f52dbd5c5e
Fix typo in Configurations docs 2017-11-19 21:14:54 +01:00
topecongiro
4e7c2756d3 Update Configurations.md 2017-11-14 23:47:30 +09:00
topecongiro
707a296377 Update Configurations.md 2017-11-14 10:49:18 +09:00
topecongiro
9a58741f29 Remove duplicated 'indent_style' section 2017-11-14 09:31:50 +09:00
topecongiro
f3aba5d1df Update Configurations.md 2017-11-13 17:33:32 +09:00
Nick Cameron
e6800bf27d remove closure_block_indent_threshold option 2017-11-13 15:40:54 +13:00
David Alber
f8eedcba5f Adding an example for combine_control_expr = false
Fixes #2132.
2017-11-12 10:16:19 -08:00
David Alber
72f77eaf47 Updating where_density = "Vertical" example
The example for `where_density = "Vertical"` does not match the
current output from rustfmt. This change corrects that.

Fixes #2133.
2017-11-12 00:16:24 -08:00
Ben Boeckel
523fc086c7 Configurations: document report_todo and report_fixme 2017-11-09 14:11:33 -05:00
Ben Boeckel
fcdd01989d Configurations: document reorder_extern_crates settings 2017-11-09 14:11:33 -05:00
Ben Boeckel
33a2bc9d3f Configurations: document error_on_line_overflow_comments 2017-11-09 14:11:33 -05:00
Ben Boeckel
4d547b38a7 Configurations: fix where_density documentation
The default is actually `Vertical`.
2017-11-09 14:11:33 -05:00
Ben Boeckel
1bb927e46f Configurations: add colons to example section titles 2017-11-09 14:11:33 -05:00
Ben Boeckel
6447e0d072 Configurations: markup max_width 2017-11-09 14:10:37 -05:00
Nick Cameron
f1035d9782
Merge pull request #2116 from topecongiro/config-options-indent
Rename config options related to indent
2017-11-06 08:43:12 +13:00
topecongiro
40c5666af6 Rename 'struct_lit_style' to 'struct_lit_indent' 2017-11-04 22:47:28 +09:00
topecongiro
d5d8740993 Rename 'fn_call_style' to 'fn_call_indent' 2017-11-04 22:46:40 +09:00
topecongiro
55c2000d94 Rename 'fn_args_layout' to 'fn_args_indent' 2017-11-04 22:45:47 +09:00
topecongiro
5096cdff56 Rename 'array_layout' to 'array_indent' 2017-11-04 22:45:09 +09:00
topecongiro
d287b06eba Rename 'chain_one_line_max' to 'chain_width' 2017-11-04 22:24:43 +09:00
Martin Lindhe
f930a16b8d fix some typos 2017-11-01 07:33:55 +01:00
Ömer Sinan Ağacan
48bdecf99d Add Configurations.md section 2017-10-27 08:25:14 +03:00
Saulo Silva
131a37591d Show examples of default values first and annotate them with "(default)" 2017-09-18 21:28:51 -04:00
topecongiro
bc56e7b710 Add visual guide for binop_separator 2017-09-15 15:10:34 +09:00
topecongiro
669a139956 Only merge consecutive derives 2017-08-24 23:48:18 +09:00
topecongiro
5dafcc24e4 Add merge_derives config option 2017-08-24 22:29:56 +09:00
Michael Smith
411c73c12f
Add multiline_{closure,match_arm}_forces_block
multiline_closure_forces_block = false (default):
    result.and_then(|maybe_value| match maybe_value {
        None => ...,
        Some(value) => ...,
    })

multiline_closure_forces_block = true:
    result.and_then(|maybe_value| {
        match maybe_value {
            None => ...,
            Some(value) => ...,
        }
    })

multiline_match_arm_forces_block = false (default):
    match lorem {
        None => if ipsum {
            println!("Hello World");
        },
        Some(dolor) => ...,
    }

multiline_match_arm_forces_block = true:
    match lorem {
        None => {
            if ipsum {
                println!("Hello World");
            }
        }
        Some(dolor) => ...,
    }
2017-08-21 14:05:20 -07:00
Nick Cameron
7e171836c6 Merge pull request #1900 from spinda/attributes-on-same-line
Add attributes_on_same_line_as_{field,variant} configs
2017-08-21 11:26:36 +12:00
Michael Smith
1c9d044c05
Add attributes_on_same_line_as_{field,variant} 2017-08-19 15:09:10 -07:00
Seiichi Uchida
a3567cec94 Add mach_pattern_separator_break_point config option 2017-08-18 23:19:11 +09:00
Seiichi Uchida
e9199fd25e Update visual guide 2017-08-15 22:10:55 +09:00
Nick Cameron
6984c05e69 Change the writemode to overwrite 2017-07-21 11:22:51 +12:00
topecongiro
988e387132 Add imports_indent and imports_layout config options 2017-07-14 09:18:28 +09:00
topecongiro
2fb66cd1d3 Add trailing_semicolon config option
trailing_semicolon controls whether to add a trailing semicolon after break,
continue and return.
2017-07-12 14:16:06 +09:00
topecongiro
c11aac04a3 Update wrap_match_arms option tests and visual guide 2017-07-11 21:53:57 +09:00