You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiline ignores (-- stylua: ignore start / -- stylua: ignore end) will now work within table fields:
require("foo").bar {
-- stylua: ignore startbaz=0, -- < not formattedfoo=2, -- < not formatted-- stylua: ignore endbar=1234-- < formatted
}
Added option "Input" to call_parentheses setting, where call parentheses are retained based on their presence in the original input code.
Note: this setting removes all automation in determining call parentheses, and consistency is not enforced.
Changed
Improved heuristics around Luau type excess parentheses removal, so unnecessary parentheses around types are removed in more locations
Fixed
Function calls are now formatted onto multiple lines if the opening brace { of a multiline table forces one of the lines over width
Fixed missing option --sort-requires to enable sort requires on the command line
$ stylua --sort-requires test.lua
Fixed parentheses removed around Luau optional type (B?) causing syntax errors when present in an intersection A & (B?)
Fixed comments lost when parentheses removed around Luau types
Fixed race condition where if a file is passed more than once as an argument to format, then it could potentially be wiped completely (for example, if an ancestor directory is passed and recursively searched, as well as the file itself)
This discussion was created from the release v0.18.0.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
[0.18.0] - 2023-06-14
Added
-- stylua: ignore start
/-- stylua: ignore end
) will now work within table fields:"Input"
tocall_parentheses
setting, where call parentheses are retained based on their presence in the original input code.Note: this setting removes all automation in determining call parentheses, and consistency is not enforced.
Changed
Fixed
{
of a multiline table forces one of the lines over width--sort-requires
to enable sort requires on the command line(B?)
causing syntax errors when present in an intersectionA & (B?)
This discussion was created from the release v0.18.0.
Beta Was this translation helpful? Give feedback.
All reactions