Skip to content

Formatter Options

This page contains a list of formatting options the formatter accepts.


In some environments (e.g. in Visual Studio Code and JavaScript) the option keys are camelCase to better fit the conventions. For example align_entries becomes alignEntries.

optiondescriptiondefault value
align_entriesAlign entries vertically. Entries that have table headers, comments, or blank lines between them are not aligned.false
align_commentsAlign consecutive comments after entries and items vertically. This applies to comments that are after entries or array items.true
array_trailing_commaPut trailing commas for multiline arrays.true
array_auto_expandAutomatically expand arrays to multiple linestrue
array_auto_collapseAutomatically collapse arrays if they fit in one line.true
compact_arraysOmit whitespace padding inside single-line arrays.true
compact_inline_tablesOmit whitespace padding inside inline tables.false
compact_entriesOmit whitespace around =.false
column_widthTarget maximum column width after which arrays are expanded into new lines.80
indent_tablesIndent subtables if they come in order.false
indent_entriesIndent entries under tables.false
indent_stringIndentation to use, should be tabs or spaces but technically could be anything.2 spaces (" ")
trailing_newlineAdd trailing newline to the source.true
reorder_keysAlphabetically reorder keys that are not separated by blank lines.false
allowed_blank_linesThe maximum amount of consecutive blank lines allowed.2
crlfUse CRLF line endings.false