Commit graph

35 commits

Author SHA1 Message Date
Pavel Sountsov
d4108a3029 Initial implementation of hard tab indentation. 2015-09-19 10:36:45 -07:00
Marcus Klaas
e72d488281 Refactor test code
No longer use callbacks or thread::catch_panic; reduce stdout spew; guard against rustfmt breaking the column limit.
2015-09-18 22:34:46 +02:00
Aaron Lobb
07f7926bc2 Added help string for chains_overflow_last config parameter 2015-09-15 21:15:46 -07:00
Aaron Lobb
d773580715 Changed ConfigType trait to only return a string of variants, rather than a vec 2015-09-14 13:43:55 -07:00
Aaron Lobb
8b808de6ff Fixed https://github.com/nrc/rustfmt/issues/291; added output to --help runtime option with possible config values 2015-09-14 00:29:15 -07:00
Marcus Klaas
03c660633f Refine chain breaking heuristics
Don't make a single line chain when it is was multi line in the source; allow overflow of the last chain element onto the next lines without breaking the chain.
2015-09-11 00:53:01 +02:00
Christoph Burgdorf
33c5776d30 Implements struct_lit_force_multiline
With struct_lit_force_multiline set to true
rustfmt won't ever mangle multiple struct properties
into one line.

Fixes #253
2015-09-08 01:25:44 +02:00
Christoph Burgdorf
14a94f0bcd Allow partial rustfmt.toml
With this change one can use a config file
that only specifies a subset of config keys
to overwrite. E.g. a config file that looks like this

struct_trailing_comma = "Never"
struct_lit_trailing_comma = "Never"

Fixes #255
2015-09-05 00:09:26 +02:00
Nick Cameron
fae93abbda Support struct-like layouts for fn args 2015-09-02 09:41:08 +12:00
Nick Cameron
f81485d9d6 Rename fn_args_layout to fn_args_density 2015-09-02 08:56:37 +12:00
Nick Cameron
6ca2756a82 Merge pull request #238 from nrc/fn-decl
Customisation of function decls
2015-09-02 08:00:28 +12:00
Nick Cameron
8d81aa1991 Support where clauses on the same line as the function decl where it all fits on one line. 2015-09-02 07:59:54 +12:00
Sinh Pham
55fe34a00f Format strings option https://github.com/nrc/rustfmt/issues/202 2015-09-01 08:14:52 -04:00
Nick Cameron
6216dce14e Support where clause predicates at different indentations 2015-09-01 19:04:41 +12:00
Nick Cameron
02a01350ff Support where predicates on the same line 2015-09-01 18:53:16 +12:00
Nick Cameron
6f3c329500 Support non-indented where clauses 2015-09-01 18:38:12 +12:00
Nick Cameron
fc2fb8be43 Support different indent styles for generics 2015-09-01 18:20:17 +12:00
Nick Cameron
0413c47a09 Support different tabbing of function args
(Although, frankly anything other than visual is deeply wrong).
2015-09-01 17:22:00 +12:00
Nick Cameron
89cda8d43a Option to pack fn args on fewer lines 2015-09-01 17:06:41 +12:00
Simon Bernier St-Pierre
9ead47151e Add project-specific configuration file support 2015-08-25 19:05:30 -04:00
Marcus Klaas
b7a71250f4 Implement single line if-else formatting 2015-08-25 22:09:46 +02:00
Marcus Klaas
5fcd313b08 Format closures 2015-08-19 23:15:56 +02:00
Marcus Klaas
8e22a73cb7 Add option to override single configuration lines for tests 2015-08-19 21:51:03 +02:00
Marcus Klaas
c4101de53d Refactor some things; add extra tests. 2015-07-24 19:00:14 +02:00
Nick Cameron
7518f68861 Add an option to format struct lits with either block or visual indent 2015-07-16 14:05:05 +12:00
Marcus Klaas
482f200b0b Update import list formatting
Include comments and sort items alphabetically.
2015-06-26 03:43:12 +02:00
Marcus Klaas
0ef5db9496 Format tuple-like structs 2015-06-23 16:54:42 +02:00
Marcus Klaas
d7b49fd76c Remove global mutable config to allow for concurrency 2015-06-23 13:26:04 +02:00
Marcus Klaas
d335d04575 Implement checks for unnumbered TODOs and FIXMEs 2015-06-12 20:58:23 +02:00
Marcus Klaas
90bc40a111 Implement basic enum formatting 2015-06-02 15:52:07 +02:00
Tomasz Dudziak
fdd7baeae9 Optionally put the opening paren on the previous line for args 2015-05-25 16:39:19 +02:00
Nick Cameron
46818d405a Struct literals 2015-05-25 19:14:20 +12:00
Nick Cameron
972f494e4e Pref for comma on the last field 2015-05-25 17:14:39 +12:00
Nick Cameron
e7adf64155 Format structs 2015-05-25 17:07:55 +12:00
Nick Cameron
6a5ef17eb1 Add config.rs which I forgot for the last commit
Closes #73
2015-05-23 22:25:36 +12:00