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

If function arguments get multi lined, still fill up until column_width #555

Open
Stanzilla opened this issue Aug 24, 2022 · 2 comments
Open
Labels
enhancement New feature or request requires option This feature request would require option configuration rfc/in discussion This issue is currently in discussion, comments are welcome!

Comments

@Stanzilla
Copy link

Stanzilla commented Aug 24, 2022

Hey there, I'm currently trying to find a way to let StyLua still use the available space left before breaking up function arguments.

The current version turns this

local function UpdateMatchData(time, matchDataChanged, unit, index, filter, name, icon, stacks, debuffClass, duration, expirationTime, unitCaster, isStealable, isBossDebuff, isCastByPlayer, spellId, modRate)

into this

local function UpdateMatchData(
  time,
  matchDataChanged,
  unit,
  index,
  filter,
  name,
  icon,
  stacks,
  debuffClass,
  duration,
  expirationTime,
  unitCaster,
  isStealable,
  isBossDebuff,
  isCastByPlayer,
  spellId,
  modRate
)

And what I want is basically

local function UpdateMatchData(time, matchDataChanged, unit, index,  filter,  name,  icon, -- Until column_width
  stacks,  debuffClass,  duration,  expirationTime,  unitCaster,  isStealable,  isBossDebuff, -- Until column_width
  isCastByPlayer,  spellId,  modRate -- Until column_width
)
@JohnnyMorganz
Copy link
Owner

This is not something StyLua currently supports, and unfortunately its unlikely it ever will.

I can see how in this case it could potentially benefit, but I'm hesitant to add it in. I'll give it a bit of a think

@Stanzilla
Copy link
Author

This is not something StyLua currently supports, and unfortunately its unlikely it ever will.

I can see how in this case it could potentially benefit, but I'm hesitant to add it in. I'll give it a bit of a think

Awesome, thank you! Alternatively, maybe an option to turn off the breaking up feature?

@JohnnyMorganz JohnnyMorganz added enhancement New feature or request rfc/in discussion This issue is currently in discussion, comments are welcome! labels Oct 10, 2022
@JohnnyMorganz JohnnyMorganz added the requires option This feature request would require option configuration label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request requires option This feature request would require option configuration rfc/in discussion This issue is currently in discussion, comments are welcome!
Projects
None yet
Development

No branches or pull requests

2 participants