Koihik / vscode-lua-format

Reformats your Lua source code
Apache License 2.0
56 stars 13 forks source link

keep_simple_block_one_line not working anymore #17

Closed theKBro closed 4 years ago

theKBro commented 4 years ago

working in version 1.2.4, broken afterwards

Koihik commented 4 years ago

Please provide more detail.

theKBro commented 4 years ago

with keep_simple_block_one_line: false in version 1.2.4 its formatting the code like this which is desired format:

local test = true

if test == true then
  test = false
end

in version 1.3.2 - 1.3.6 this is the result:

local test = true

if test == true then test = false end
Koihik commented 4 years ago

It looks like some version changed it to keep_simple_control_block_one_line.

https://github.com/Koihik/LuaFormatter/blob/master/docs/Style-Config.md#keep_simple_control_block_one_line

theKBro commented 4 years ago

thanks a lot!

keep_simple_function_one_line: false
keep_simple_control_block_one_line: false

solved the problem