Koihik / LuaFormatter

Code formatter for Lua
Apache License 2.0
708 stars 86 forks source link

Option `space_inside_table_braces` should only apply to single-lines #279

Open ronvoluted opened 1 year ago

ronvoluted commented 1 year ago

spaces_inside_table_braces

type: bool, default: false

Inserts spaces inside the braces in a table constructor.

Current behaviour:

-- original
x = {1, 2, 3}

point = {
  x = 1,
  y = 2
}

-- transformed
x = { 1, 2, 3 }

point = {
  x = 1,
  y = 2
 } -- extra space

Expected behaviour:

-- transformed
x = { 1, 2, 3 }

point = {
  x = 1,
  y = 2
}