LuaFormatter icon indicating copy to clipboard operation
LuaFormatter copied to clipboard

Align Options Are Sometimes Ignored

Open benrob0329 opened this issue 6 years ago • 1 comments

Config:

column_limit: 100
use_tab: true
indent_width: 1
continuation_indent_width: 1
keep_simple_function_one_line: false
keep_simple_control_block_one_line: false
align_args: false
align_parameter: false
align_table_field: false
chop_down_table: true
chop_down_parameter: true
break_before_table_rb: true
break_after_table_lb: true
extra_sep_at_table_end: true
single_quote_to_double_quote: true

Problematic Results:

minetest.register_on_mods_loaded(function()
	applicable_furniture = table.search(ikea.registered_furniture,
                       		{includes = {size_x = 1, size_y = 1, size_z = 1}}) -- Formatter attempts to align using spaces _and_ adds tabs for intentation level, somehow failing at both it seems
end)

----------

function music.display_song_info(song)
	local message = music.tracks[song].title .. " by " .. music.tracks[song].author .. ", " ..
                		music.tracks[song].license -- Same here
	minetest.chat_send_all(message)
end

----------

assert(table.equals({"a", "b", c = "d", e = {"f", "g", "h", {"h"}}},
       	{"a", "b", c = "d", e = {"f", "g", "h", {"h"}}})) -- And Here

Expected Results:

minetest.register_on_mods_loaded(function()
	applicable_furniture = table.search(ikea.registered_furniture,
		{includes = {size_x = 1, size_y = 1, size_z = 1}})
end)

----------

function music.display_song_info(song)
	local message = music.tracks[song].title .. " by " .. music.tracks[song].author .. ", " ..
		music.tracks[song].license
	minetest.chat_send_all(message)
end

----------

assert(table.equals({"a", "b", c = "d", e = {"f", "g", "h", {"h"}}},
	{"a", "b", c = "d", e = {"f", "g", "h", {"h"}}}))

benrob0329 avatar Jan 18 '20 01:01 benrob0329

@karanankit01 did you check this?

tammela avatar Jun 07 '20 09:06 tammela