StyLua
StyLua copied to clipboard
An opinionated Lua code formatter
in this example, spacing before and inside of comments is key to legibility (in fixed-width font, anyway): ```lua function foo( tinky, -- this is winky, -- my aligned inky, --...
Given that [.editorconfig file](https://editorconfig.org/) provides some settings that are supported by stylua, it could be handy to read that file to avoid duplicating these settings.
I was experimenting with using StyLua on minified Lua, and found that StyLua fails to parse this valid Lua when minified. source: ```lua local function test() goto end_thing local x...
A common problem that occurs (especially with lots of external contributors to a project) is when the version of the stylua binary installed and the version of the binary used...
For instance, If I have a `.styluaignore` file that looks like: `path/` This will check the file: `stylua -c path/to/file.lua` But this would not: `stylua -c .` As an alternative,...
We currently build release assets with all flags enabled (both `luau` and `lua52`). At the moment, this is fine, as there is no conflicting syntax between the two. The GitHub...
I'm not sure if this is something that's able to be fixed, but this is the before and after. I much prefer the before.     vvv This...
Multi-line chained functions are merged onto a less-readable single line, but under the column width
Related to #78, chained functions are merged onto a single line which makes them less readable -- even if a short line. ## Before ```lua -- under column-width if do_icon...
Lot of times I have these inevitable if-else ladders and it gets a bit hard finding my way through them which is why I leave an blank line before my...
In line with https://github.com/JohnnyMorganz/StyLua/issues/133#issuecomment-846131062, here is one more special case where one might wish to keep parentheses even with `no_call_parentheses`: If the function is a "factory" that returns another function...