LuaFormatter icon indicating copy to clipboard operation
LuaFormatter copied to clipboard

chop down parameter for function call

Open surgura opened this issue 4 years ago • 1 comments

#37 implemented the chopping down of parameters for function headers. It would be great to extend this to function calls as well.

Input

local str = test(123, 12312, 5345, 12312, 5345, 12312, 5345, 12312, 5345, 12312, 5345, 12312, 5345, 12312, 5345, 12312, 5345, 12312, 5345)

desired output

local str = test(123,
    12312,
    5345,
    12312,
    5345,
    12312,
    5345,
    12312,
    5345,
    12312,
    5345,
    12312,
    5345,
    12312,
    5345,
    12312,
    5345,
    12312,
    5345,
    12312,
    5345,)

current output

local str = test(
                123, 12312, 5345, 12312, 5345, 12312, 5345, 12312, 5345, 12312, 5345, 12312, 5345, 12312, 5345, 12312,
                5345, 12312, 5345
            )

surgura avatar Oct 29 '19 13:10 surgura

The situation of function call's args will be more complex. It may be supported in the future.

Koihik avatar Oct 30 '19 13:10 Koihik