tbastos / vim-lua

Improved Lua 5.3 syntax and indentation support for Vim
120 stars 17 forks source link

Indentation issue with table literal function arguments #23

Open Janfel opened 2 years ago

Janfel commented 2 years ago

Hello, I have noticed an issue with the indentation of table literals as function arguments, when the braces and parentheses are combined like below.

Expected Indentation

do
  foo()
  somefunction(arg1, arg2, {
    key1 = val1, key2 = val2,
  })
  otherfunction({
    key3 = val3, key4 = val4,
  })
  bar()
end

Actual Indentation

do
  foo()
  somefunction(arg1, arg2, {
      key1 = val1, key2 = val2,
    })
  otherfunction({
      key3 = val3, key4 = val4,
    })
  bar()
end