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

Function definition for a very long variable name results into only closing bracket moved to the next line #830

Closed
echasnovski opened this issue Dec 10, 2023 · 1 comment · Fixed by #838
Labels
bug Something isn't working

Comments

@echasnovski
Copy link

Example:

local a_very_long_variable_name_given_that_is_bigger_than_width_upper_limit_but_unfortunately_can_not_be_made_shorter = function()
	print("Hello")
end

Formatting with StyLua 0.19.1 and default config leads to this:

local a_very_long_variable_name_given_that_is_bigger_than_width_upper_limit_but_unfortunately_can_not_be_made_shorter = function(
)
	print("Hello")
end

Not sure if this is intended and couldn't find an issue.

I think this did not happen in 0.15.1.

@JohnnyMorganz JohnnyMorganz added the bug Something isn't working label Dec 23, 2023
@JohnnyMorganz
Copy link
Owner

Probably missing a check for if there are actually any arguments to expand onto multiple lines 😅

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