Closed gepbird closed 2 years ago
in fact, lua allow semicolon as the end of table field. should this called 'railing_comma'?
Hmm, that's intresting. If you want to include semicolons too maybe calling it trailing_separator (or trailing_table_separator?) would be better. And also having another option separator_style (or table_separator ) that has values comma and semicolon.
I don't insist on supporting semicolons for this, since I've only seen lua codebases that use commas.
ok wait one day
feature complete.
option table_separator_style
support none/comma/semicolon
option trailing_table_separator
support keep/never/always/smart
trailing_comma option should control how trailing commas are formatted in tables. This feature would make git diffs nicer. The values could be:
Personally I wouldn't use always value, but some people might find it useful.