Ur

Ur's own style for languages with no reference formatter, which breaks long lines where each language lets them break.

Formats
Shell, TOML, Urscal
In ur.toml
[format] style = "ur"

Shell, formatted

cart.sh, as written
#!/usr/bin/env bash
# What a cart costs: the sum of each item's price times its quantity, read from a CSV file of items.
set -euo pipefail
test -f "$1" || { echo "usage: cart.sh items.csv" >&2; exit 1; }
tail -n +2 "$1" | awk -F, '{ sum += $2 * $3 } END { printf "%.2f\n", sum }' | tee --append subtotals.log
ur format --style ur cart.sh
#!/usr/bin/env bash
# What a cart costs: the sum of each item's price times its quantity, read from
# a CSV file of items.
set -euo pipefail
test -f "$1" || { echo "usage: cart.sh items.csv" >&2; exit 1; }
tail -n +2 "$1" | awk -F, '{ sum += $2 * $3 } END { printf "%.2f\n", sum }' |
    tee --append subtotals.log

Try it in the playground →

TOML, formatted

cart.toml, as written
# What a cart holds: each item's name, price, and quantity, and the codes that discount them.
[cart]
items = [{ name = "hammer", price = 12.5, quantity = 1 }, { name = "nail", price = 0.05, quantity = 100 }]
codes = ["SPRING", "WELCOME", "FRIENDS-AND-FAMILY"]   
ur format --style ur cart.toml
# What a cart holds: each item's name, price, and quantity, and the codes that
# discount them.
[cart]
items = [{ name = "hammer", price = 12.5, quantity = 1 },
    { name = "nail", price = 0.05, quantity = 100 }]
codes = ["SPRING", "WELCOME", "FRIENDS-AND-FAMILY"]

Try it in the playground →

Urscal, formatted

Discounts.rsc, as written
module cart::Discounts
// Whether a cart's codes discount it: a code the store knows, on a cart holding more than one item.
bool discounted(Tree cart) = any(c <- codes(cart), contains(["SPRING", "WELCOME", "FRIENDS-AND-FAMILY"], unparse(c))) when size(items(cart)) > 1;
default bool discounted(Tree _) = false;   
ur format --style ur Discounts.rsc
module cart::Discounts
// Whether a cart's codes discount it: a code the store knows, on a cart holding
// more than one item.
bool discounted(Tree cart) = any(c <- codes(cart),
  contains(["SPRING", "WELCOME", "FRIENDS-AND-FAMILY"], unparse(c)))
  when size(items(cart)) > 1;
default bool discounted(Tree _) = false;

Try it in the playground →

Defaults

The shared options, as Ur sets them when nothing configures it. Its own names for them are read from its configuration files, but ur.toml sets them by the shared name only.

OptionDefaultUr calls it
width80
max-width
indent.width4
indent.style
line-ending"auto"
trailing-comma.add"preserve"
trailing-comma.forces-breakfalse
quotes"preserve"
target

Its own options

Ur takes no options of its own beyond the shared ones.