StyLua
StyLua copied to clipboard
An opinionated Lua code formatter
Try formatting this function ```lua local function foo() local bar = 'baz' end ``` It will result in this ```lua local function foo() local bar = 'baz' end ``` Where...
So I have an example here: ``` example = {vaue1, value 2} ``` When formatted: ``` example = { value1, value2 } ``` However, I prefer this: ``` example =...
Due to Lua not recognizing line breaks as statement delimiters, there is an infamous ambiguity of the Lua syntax. If a blank line is left in an indented block as...
If an argument within a function call is going to be broken up into multiple lines, the entire series of arguments should also be broken up. So instead of this:...
it would be nice if type tables, tables function declaration argument lists, and function call argument lists would be left multi-line if they have an explicit newline directly after their...
Add a configuration option to provide functionality that was changed in #207. The extension no longer updates the user about updates to the latest version when they have configured the...
`contains_comments` turns out is a very expensive function for big files... We do some reorganisation and reduce the reliance on this function. We should try and remove its use completely....
When attempting to run stylua-system pre-commit hook, an exception is thrown as it attempts to find stylua.EXE (in capital letters). stylua is installed with aftman under that name, but only...
1. Create a file with line `string.rep("ыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыы", 10)`. 2. Run `stylua` with default config on that file. It results into multi line function call, but line width is only 70...
Sometimes we use a local variable inside an anonymous function like so: ```lua local connection connection = ...(function() connection:Disconnect() end) ``` And doing this makes it look better imo: ```lua...