Skip to content
On this page

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.

In some environments (e.g., Visual Studio Code), one needs to reload the extension to let the settings take effect.

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 lines when they exceed column_width characters.true
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
inline_table_expandExpand values (e.g. arrays) inside inline tables.true
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
reorder_arraysAlphabetically reorder array values that are not separated by blank lines.false
allowed_blank_linesThe maximum amount of consecutive blank lines allowed.2
crlfUse CRLF line endings.false