-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
enhancementNew feature or requestNew feature or requestluauFormatting related to LuauFormatting related to Luau
Description
A column width-exceeding function definition with multiple return types with generics collapses over one of the type parameters instead of placing each return type on a new line.
Before and after:
-- before
local function getData(player: Player): (LongReturnValueWithTypeGeneric1<TypeParameter1>, LongReturnValueWithTypeGeneric2<TypeParameter2>) end
-- after
local function getData(player: Player): (LongReturnValueWithTypeGeneric1<TypeParameter1>, LongReturnValueWithTypeGeneric2<
TypeParameter2
>) end
-- expected
local function getData(player: Player): (
LongReturnValueWithTypeGeneric1<TypeParameter1>,
LongReturnValueWithTypeGeneric2<TypeParameter2>
) endExample of expected output working for a similar example:
-- before
local function getData(player: Player): (LongReturnValueNameWithoutTypeGeneric1, LongReturnValueNameWithoutTypeGeneric2, LongReturnValueNameWithoutTypeGeneric3) end
-- after & expected
local function getData(player: Player): (
LongReturnValueNameWithoutTypeGeneric1,
LongReturnValueNameWithoutTypeGeneric2,
LongReturnValueNameWithoutTypeGeneric3
) endstylua.toml:
column_width = 120
line_endings = "Windows"
indent_type = "Tabs"
indent_width = 4
quote_style = "AutoPreferDouble"
call_parentheses = "NoSingleTable"
collapse_simple_statement = "Never"
[sort_requires]
enabled = trueMetadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestluauFormatting related to LuauFormatting related to Luau