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

Auto-import inserting in the middle of multi-line variable assignment #725

Closed
Ketasaja opened this issue Jul 30, 2024 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@Ketasaja
Copy link
Contributor

Ketasaja commented Jul 30, 2024

StyLua formats long imports to use multiple lines.

When the module being auto-imported has a lower alphabetical index than an imported module, it can be inserted in the middle of a multi-line import.

local _ =
	require(script.Parent.d)
local _ =
local c = require(script.Parent.c)
	require(script.Parent.d)

c -- auto-imported `c`
local _ =
	require(script.Parent.d)
local e = require(script.Parent.e)

e -- auto-imported `e`
@JohnnyMorganz JohnnyMorganz added the bug Something isn't working label Jul 30, 2024
JohnnyMorganz added a commit that referenced this issue Aug 10, 2024
Split out existing code into testable functions.
Add tests for multi-line existing requires.

Work towards #725
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

No branches or pull requests

2 participants