Skip to content

Uncorrect align of arguments #22

@andrejlevkovitch

Description

@andrejlevkovitch

I have problem with uncorrect formatting function arguments.
My config file:

column_limit: 80
use_tab: true
indent_width: 1
continuation_indent_width: 1
keep_simple_block_one_line: false
align_args: false
break_after_functioncall_lp: false
break_before_functioncall_rp: false
align_parameter: false
break_after_functiondef_lp: false
break_before_functiondef_rp: false
align_table_field: false
break_after_table_lb: false
break_before_table_rb: false
chop_down_kv_table: true
table_sep: ','
extra_sep_at_table_end: true
break_after_operator: true

This is how work now:

function tmp()
	my_fund = alfa(beta, charlie, gamma, echo, foxtrot, lima, kilo, india, juliet,
												november)
	local body, mime = cache_images:get(config.CACHE.IMAGES_KEY_PREFIX .. cid ..
																																						type, beta, charlie)

end

But, of course, it is wrong. I think, I found wrong line:

// FormatVisitor.cpp:715
        firstArgsIndent = cur_columns() - indent_ - indentForAlign_;

Why here uses cur_columns()? I just remove it:

        firstArgsIndent = indent_ - indentForAlign_;

And now code looks like:

function tmp()
	my_fund = alfa(beta, charlie, gamma, echo, foxtrot, lima, kilo, india, juliet,
			november)
	local body, mime = cache_images:get(config.CACHE.IMAGES_KEY_PREFIX .. cid ..
			type, beta, charlie)

end

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions