Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain tokens are not taken into account when counting column width #282

Closed
archiif opened this issue Oct 17, 2021 · 0 comments · Fixed by #283
Closed

Certain tokens are not taken into account when counting column width #282

archiif opened this issue Oct 17, 2021 · 0 comments · Fixed by #283
Labels
bug Something isn't working

Comments

@archiif
Copy link

archiif commented Oct 17, 2021

I set my column width to 88 and these two table keys occupies exactly 88 chars + 1 char from the last comma separating the keys.

a = {
    key1 = string.format("test", "test", "test", "test", "test", "test", variable_names),
    key2 = string.format("test", "test", "test", "test", "test", "test", variable_names),
}

But stylua doesn't chop down the arguments like it is supposed to, so it seems that the comma isn't taken into account when calculating the column width.

If you extend the arguments like this:

a = {
    key1 = string.format(
        "test",
        "test",
        "test",
        "test",
        "test",
        "test",
        variable_names_
    ),
    key2 = string.format(
        "test",
        "test",
        "test",
        "test",
        "test",
        "test",
        variable_names_
    ),
}

stylua will chop them down properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants