StyLua
StyLua copied to clipboard
An opinionated Lua code formatter
```lua -- stylua: ignore start keys = { -- Essential { "", function() Snacks.picker.smart() end, desc = "Smart Find Files" }, { ",", function() Snacks.picker.buffers() end, desc = "Buffers" },...
Hi! I noticed that in the `Cargo.toml` file Link-Time Optimization (LTO) for the project is not enabled. I suggest switching it on since it will reduce the binary size (always...
When building with `cargo install stylua --feature luajit`, I get a panic when formatting a Lua file that contains a `goto`. Everything works fine if I build with `cargo install...
closes #936 For now I did not get around to porting the VsCode extension to LSP, so the easiest way to try this out is to use nvim: ```sh cargo...
Given the configuration options that are currently available, there's no way of enforcing a consistent style for single table calls, while at the same time never altering single string calls....
### Discussed in https://github.com/JohnnyMorganz/StyLua/discussions/961 Originally posted by **trymeouteh** March 13, 2025 Please add the config options in the VSCode global `settings.json`. When these options are set, StyLua will always use...
I am writing my own lua parser and running lua validation tests imported from the lua repo. You can find these files here: https://github.com/lua/lua/tree/master/testes However `stylua` has some issues on...
```luau export type AstExprTableItem = | { kind: "list", value: AstExpr, separator: Token? } | { kind: "record", key: string, equals: Token, value: AstExpr, separator: Token? } | { kind:...
Many formatters/linters such as `biome` or `ruff` are also available as LSP, even though they aren't "real" language servers. Offering an LSP, even if it is just for the formatting...