Bot releases are visible (Hide)
Published by JohnnyMorganz over 3 years ago
Config
structs when using StyLua as a libraryAutoPreferDouble
, AutoPreferSingle
, ForceDouble
and ForceSingle
.stylua.toml
filegoto
s and labels. See #87 to track further support for Lua 5.2 syntax.setmetatable({ ... }, class)
, where{ ... }
is a multiline table, but we don't want to expand onto multiple lines. StyLua will not allow a mixture of multiline tables and small identifiers in betweencall({ ... }, foo, { ... })
), in order to improve readability.ForceDouble
to AutoPreferDouble
. We will now default to swapping quote type if it will reduce the number of escapes.(function() ... end)()
Published by JohnnyMorganz over 3 years ago
print((x))
will be formatted to print(x)
, as the parentheses are unnecessary. We also consider casesprint((x()))
- removing the parentheses changes the meaning of the code.column_width
setting, which is used to guide when StyLua should wrap lines. It defaults to 120
.--range-start <num>
and --range-end <num>
(both optional, and both inclusive).-- stylua: ignore
, then the statement will be ignored during formatting.--check
output. We now use a more detailed output which should help in determining diffs#foo
) and a trailing comment forcing an unnecessary hanging expressionPublished by JohnnyMorganz over 3 years ago
Published by JohnnyMorganz over 3 years ago
.5
turns to 0.5
)Published by JohnnyMorganz almost 4 years ago
.styluaignore
file extension matching not working due to the default override globstylua --help
stylua.toml
requiring a complete configuration file with all options setPublished by JohnnyMorganz almost 4 years ago
until
token in a repeat block not being correctly indentedPublished by JohnnyMorganz almost 4 years ago
Published by JohnnyMorganz almost 4 years ago
stylua -
to make StyLua read from stdin, and a formatted output will be written to stdout--check
command line flag. If enabled, then StyLua will check through the files and emit a diff for files with incorrect formatting, exiting with status code 1. StyLua will not modifiy files--pattern
to --glob
(with short form -g
). --glob
can now accept multiple globs.stylua -g *.lua -g !*.spec.lua .
will format all Lua files apart from .spec.lua
test files..styluaignore
file, which follows a similar structure to .gitignore
files. Any patterns matched inside of this file will be ignored.Published by JohnnyMorganz almost 4 years ago
indent_width
to 4until
token in a repeat block. The new line is now added at the end of the until expression.end
token at the end of a block.Published by JohnnyMorganz almost 4 years ago
Published by JohnnyMorganz almost 4 years ago
Preliminary alpha release of StyLua