StyLua
StyLua copied to clipboard
An opinionated Lua code formatter
We in the neovim project are using stylua for a great deal of our lua code and we look to expand to use it also for our test suite. One...
```lua local arg_with_long_name, function_with_long_name --- 1 function_with_long_name(function_with_long_name( arg_with_long_name, -- comment arg_with_long_name, arg_with_long_name, arg_with_long_name, arg_with_long_name, arg_with_long_name )) --- 2 function_with_long_name(function_with_long_name( arg_with_long_name, --[[comment]] arg_with_long_name, arg_with_long_name, arg_with_long_name, arg_with_long_name, arg_with_long_name )) --- 3 function_with_long_name(function_with_long_name(...
Bumps [clap](https://github.com/clap-rs/clap) from 3.1.6 to 4.4.7. Release notes Sourced from clap's releases. v4.4.6 [4.4.6] - 2023-09-28 Internal Upgrade anstream v4.4.5 [4.4.5] - 2023-09-25 Fixes (parser) When inferring subcommand name or...
Braces, used for table construction, are typically used with spaces inside them: ```lua t = { "content-0" } ``` There can be another style, however, which consists in sticking the...
Hi, The current VSCode StyLua extension is unable to search for configuration files in parent directories of a Lua file not in the current workspace. I fixed that issue by...
Improves on #606 (#276)
Currently stylua removes many redundant parens, and in one specific case it's triggering a luau analysis warning. Ex: ```lua local _ = (not true) == true ``` Changes to: ```lua...
```lua local function getType(el) if type(tips_) == "table" and tips_ ~= nil then if CroakIs.isForwardPie(element) then local functionNemo = if type(tips_.wander) == "function" and Boo.toVSBoo(debug.info(tips_.wander, "n")) then debug.info(tips_.wander, "n") else...
Stylua should be able to sort variables in this manner, as what styluas current sort requires/services produces is not that great. It would also be great if this was extended...
If I add a file `test.lua` to my `.styluaignore`, it will correctly get ignored in both of these usages: ```console $ stylua --respect-ignores test.sua $ ls *.lua | xargs stylua...